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
Using this layer to extend it in Nuxt3 project which uses VIte throws these errors for these dependencies, however production build works fine
// latest eventemitter3 does have esm and cjs exports
Uncaught SyntaxError: The requested module '/_nuxt/@fs/Users/name/proj/node_modules/eventemitter3/index.js?v=03fb350f' does not provide an export named 'default' (at index.mjs?v=03fb350f:1:8)
Uncaught SyntaxError: The requested module '/_nuxt/@fs/Users/name/proj/node_modules/tweetnacl/nacl-fast.js?v=327046d2' does not provide an export named 'default' (at index.mjs?v=327046d2:25:8)
Uncaught SyntaxError: The requested module '/_nuxt/@fs/Users/name/proj/node_modules/ed2curve/ed2curve.js?v=0067c408' does not provide an export named 'default' (at index.mjs?v=0067c408:5:8)
// getting same error for buffer
Uncaught SyntaxError: The requested module '/_nuxt/@fs/Users/nickname/moar/oro/node_modules/buffer/index.js?v=a9cd81b9' does not provide an export named 'Buffer' (at index.mjs?v=a9cd81b9:178:10)
// poseidon-lite : also did return this error but resolving at local package manager level worked
I do have solution to prevent this on dev server but I think this should be addressed at adapter-core or ts-sdk level since using vite also more common
Solution
Write alias to resolve correct file in vite config
The text was updated successfully, but these errors were encountered:
itsmnthn
changed the title
Using Vite results error dev mode due to cjs and esm modules usage.
Using Vite results error in dev mode due to cjs and esm modules usage.
Aug 28, 2024
Wrote a simple @moar-market/aptos-wallets-vue: A Nuxt layer using
wallet-adapter-core
for a personal project.Using this layer to extend it in Nuxt3 project which uses VIte throws these errors for these dependencies, however production build works fine
I do have solution to prevent this on dev server but I think this should be addressed at adapter-core or ts-sdk level since using vite also more common
Solution
Write alias to resolve correct file in vite config
for enforcing new version added these to
package.json
The text was updated successfully, but these errors were encountered: