Closed blackpanther1881 closed 4 months ago
You were unlucky enough to download @solana/spl-token
right when I broke it. Bad versions are 0.4.4 and 0.4.5. Update to 0.4.6 and you should be good.
@steveluscher, I mentioned package @solana/spl-stake-pool@1.1.2 not @solana/spl-token.
@solana/spl-token
is a dependency of @solana/spl-stake-pool
. You can’t get one without the other.
can we get latest version with updating @solana/spl-token version to 0.4.4, bcz i tried updating @solana/spl-token version inside my application but getting same error.
@solana/spl-token
to 0.4.4?@steveluscher any update on this issue ?
Thanks for this report. I found the problem. Update to 0.1.3.
Error: require() of ES Module Users/node_modules/@solana/spl-token-group/lib/cjs/index.js from Users/node_modules/@solana/spl-token/lib/cjs/extensions/tokenGroup/actions.js not supported.
index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /Users//node_modules/@solana/spl-token-group/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
Tried this but no luck.