NPM not installing on local machine

Viewed 281

Below are the specifications.

Node Version : v16.13.0
Npm Version : 8.1.2

Below are the commands that i tried one by one.

npm cache clean

npm install --no-bin-links

npm install --save

After that, I got the below error. As clearly shown in the error that the paython PATH issue then I tried the below command and the cmd is halted from last 16 hours

Error Screenshot

After installing the windows build tools it's stuck the screen for the last 16 hours. Below is the command that i execute.

npm install --global windows-build-tools

enter image description here

I tried all possibilities like removing node_modules dir and removing package.json, package-lock.json

1 Answers

From the error it looks like you have python 3 installed, but the print statement of a module you're trying to compile with node-gyp is written the python 2 way (that is, it's an actual statement and not a function). Try to install python 2 and put it in the path as "python2" like the error message says.

Related