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/ui@2.4.0
npm ERR! Found: rollup@3.1.0
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 rollup-plugin-babel@4.4.0
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 !!!
- 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?