Home > database >  Npm install eror
Npm install eror

Time:12-05

Having an issue with npm install on my project. Used to be ok just few days ago.

Solutions like

npm cache clean —force

deleted node-modules

package-lock.json

npm install

Those steps havent helps.

I have created gist so you could see the error and maybe understand more then i do.

Many thanks in advance.

https://gist.github.com/ladygo93/c2c5c87759bc33210866418e457165d3

CodePudding user response:

Older version of node-sass don't work with new versions of Node.js. You can find the exact version requirements here. Similarly, newer versions on npm use newer version of Node.js (see here). And in fact, npm is bundled in the Node.js installer.

If node-sass is a dependency defined in your package.json, updating to a newer version should fix the error. If node-sass is a transitive dependency or if you cannot update it because of compatibility issues, you'll have to stick to the old versions of Node.js and npm.

CodePudding user response:

You have to use the older version of npm used in the production. You can do it two ways:

1: Install the older version of npm using npm -g install npm@6 2: Use npx to install a different version of npm while keeping the current version of npm in your system. Use command npx -p npm@6

  • Related