-
Notifications
You must be signed in to change notification settings - Fork 279
Open
Description
aes-js is currently causing issue for es-module based system like https://vitejs.dev/
I am getting this error :
TypeError: Cannot read property 'aesjs' of undefined
at /@fs/C:/dev/wighawag/jolly-roger/node_modules/.pnpm/[email protected]/node_modules/aes-js/index.js:790:18
at /@fs/C:/dev/wighawag/jolly-roger/node_modules/.pnpm/[email protected]/node_modules/aes-js/index.js:798:3
at instantiateModule (C:\dev\wighawag\jolly-roger\node_modules\.pnpm\[email protected]\node_modules\vite\dist\node\chunks\dep-66eb515d.js:69030:166)
which indicate that this line fails root is undefined :
Line 795 in 7c9fad4
if (root.aesjs) { |
Note that the error comes when importing @ethersproject/wallet
that relies on aes-js
My current workaround is to use my fork of aes-js which expose es-module only via this minimal change : master...wighawag:as-es-module
emirfatusic
Metadata
Metadata
Assignees
Labels
No labels