I’m building a svelte app, but when installing, I get this error:
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: rollup@3.25.2
npm ERR! notsup Not compatible with your version of node/npm: rollup@3.25.2
npm ERR! notsup Required: {"node":">=14.18.0","npm":">=8.0.0"}
npm ERR! notsup Actual: {"npm":"7.20.6","node":"v16.14.2"}
I’ve specified the node engine in package.json, and tried adding npm 9.8.1 to my dependencies, but glitch refuses to use npm over 7.20.6. Is there any way to make it use a more up-to-date version of npm?
node v16.14.2, npm 9.8.1
Installing...
npm WARN reify Removing non-directory /app/node_modules
added 111 packages, and audited 360 packages in 19s
33 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Total install time: 22353ms
🔂🎷 Your app is listening on http://0.0.0.0:3000
although that “reify Removing non-directory /app/node_modules” looks pretty troubling
edit: to clarify, npm 7.x runs again to install npm 9.x, then later installs happen from npm 9.x . that’s not good for automatic project startup
Thanks for that final clarification. That did it. I removed all dependencies from my package.json, except for `“npm”: “^9.8.1”, let it auto-install, then added them back in. From then on, it used npm 9.8.1.