You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use chia-utils in Vue 2 app, code looks like this in main.js:
import { puzzle_hash_to_address } from 'chia-utils'
The error message in browser (Firefox) is: Uncaught TypeError: window.Buffer is undefinedchia-utils.js:9863
I guess it was because in Vue 2.x, window object only accessible after mounted, but chia-utils tried to access window.Buffer just inside import initialization code.
Any way to solve this?
Thank you.
The text was updated successfully, but these errors were encountered:
We don't use ES6 imports (import ... from ...). Please reference our install instructions and try the NPM import. If that import doesn't work, you can try the browser import instead. Please let us know if using one of these two imports solves the issue.
I'm trying to use chia-utils in Vue 2 app, code looks like this in main.js:
import { puzzle_hash_to_address } from 'chia-utils'
The error message in browser (Firefox) is:
Uncaught TypeError: window.Buffer is undefined
chia-utils.js:9863
I guess it was because in Vue 2.x, window object only accessible after mounted, but chia-utils tried to access window.Buffer just inside import initialization code.
Any way to solve this?
Thank you.
The text was updated successfully, but these errors were encountered: