-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
I run the following:
npm install msgpack
and get:
> msgpack@1.0.2 install {path}\node_modules\msgpack
> node-gyp rebuild
{path}\node_modules\msgpack>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Path\To\Python\Python36\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:276:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd {path}\node_modules\msgpack
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN photo-manager-fileserver No repository field.
npm WARN photo-manager-fileserver No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! msgpack@1.0.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the msgpack@1.0.2 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! {APPDATA}\npm-cache\_logs\2018-11-10T15_28_49_571Z-debug.log
Because I have Python 3.6 in my PATH, it attempts to use that to run a command which is designed for Python 2, so it fails to install.
I then ran the following:
set PATH=C:\Python27;C:\Program Files\nodejs
npm install --save msgpack
...and the installation worked fine. However, this step shouldn't be necessary, and I wouldn't have thought that having Python 3 in the PATH was such an unusual circumstance.
I don't know enough about NPM packaging to understand where the problem is (or how it might be fixed) but this seemed like the best place to post this issue.
Metadata
Metadata
Assignees
Labels
No labels