Closed iGoodie closed 5 years ago
First of all I have Python 3.7.2 installed and PYTHON variable set (mapped to python.exe) on my environment
Python 3.7.2
PYTHON
python.exe
I include "fast-ratelimit": "^2.2.0" as a dependency in my package.json
"fast-ratelimit": "^2.2.0"
package.json
Then execute npm install command. However it cannot install correctly, printing these;
npm install
gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\Program Files\python\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "<string>", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:962:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) gyp ERR! System Windows_NT 10.0.17763 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build" gyp ERR! cwd D:\Visual Studio Code Workspace\workspace-commissions\exponent-socket-server\node_modules\hashtable-patch-valeriansaliou gyp ERR! node -v v10.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN exponent-socket-server@1.0.0 No description npm WARN exponent-socket-server@1.0.0 No repository field. npm WARN exponent-socket-server@1.0.0 No license field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! hashtable-patch-valeriansaliou@2.1.5 install: `node-gyp configure build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hashtable-patch-valeriansaliou@2.1.5 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\xgen_\AppData\Roaming\npm-cache\_logs\2019-02-18T14_36_11_427Z-debug.log
It turned out to be a problem with node-gyp requiring python 2 instead of python 3.
node-gyp
python 2
python 3
npm i windows-build-tools -g solved my problem
npm i windows-build-tools -g
Problem and How to Reproduce?
First of all I have
Python 3.7.2
installed andPYTHON
variable set (mapped topython.exe
) on my environmentI include
"fast-ratelimit": "^2.2.0"
as a dependency in mypackage.json
Then execute
npm install
command. However it cannot install correctly, printing these;