Hello when I try to add this package to my app i get the following error:
error - .../app/node_modules/@portal-payments/solana-wallet-names/dist/index.js:1
import { PublicKey } from "@solana/web3.js";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at compileFunction ()
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1119:15)
at Module._compile (node:internal/modules/cjs/loader:1155:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
at Module.load (node:internal/modules/cjs/loader:1069:32)
at Function.Module._load (node:internal/modules/cjs/loader:904:12)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)
Apparently next.js has a problem with js files that are ESmodules (which is annoying, Svelte doesn't). @tonivlad has a fix for this though (thanks Vlad) and I'll add another comment when this is in a release.
Hello when I try to add this package to my app i get the following error:
error - .../app/node_modules/@portal-payments/solana-wallet-names/dist/index.js:1 import { PublicKey } from "@solana/web3.js"; ^^^^^^
SyntaxError: Cannot use import statement outside a module at compileFunction ()
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1119:15)
at Module._compile (node:internal/modules/cjs/loader:1155:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
at Module.load (node:internal/modules/cjs/loader:1069:32)
at Function.Module._load (node:internal/modules/cjs/loader:904:12)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)