126
rated 0 times
[
131]
[
5]
/ answers: 1 / hits: 10410
/ 2 Years ago, fri, october 14, 2022, 12:00:00
i want to install
rollup-plugin-visualizer
but its need to update rollup.
updated rollup from
1.8.0
to3.1.0
got error
[!] RollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.
delete node-modules folder and package-lock.json and install again
npm i
got error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @bet-core/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/rollup
npm ERR! dev rollup@"^3.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rollup@">=0.60.0 <3" from [email protected]
npm ERR! node_modules/rollup-plugin-babel
npm ERR! dev rollup-plugin-babel@"^4.3.2" from the root project
rollup-plugin-babel
npm page says !!!
💡 This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
- i have delete
rollup-plugin-babel
then install@rollup/plugin-babel.
now i got this error
[!] RollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.
Original error: Cannot use import statement outside a module
can someone tell me where to look for this error solutions?
More From » package