记录 npm install 报错-gyp ERR configure error

今天从gitlab上clone下以前的项目npm报

gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run

往下翻会看到有报node-sass不兼容当前node版本的提示信息,这是由于package.json中锁定了node-sass版本,解决办法有啷个
一:升级node-sass版本与当前node版本兼容
二:重新安装较低版本的node
由于我的node是16 ,我直接下载14

你可能感兴趣的:(node.js)