[英]Unable to run npm command “npm install -g tty.js”.
***Unable to run npm command "npm install -g tty.js".
Here is the error log I am getting :***
=D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\ws =D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\ws
(node-gyp rebuild 2> builderror.log) ||
(node-gyp 重建 2> builderror.log) || (exit 0) D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\ws>if not defined npm_config_node_gyp (node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp-bin\\....\\node_modules\\node-gyp\\b in\\node-gyp.js" rebuild ) else (node "" rebuild )
(exit 0) D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\ws>如果没有定义 npm_config_node_gyp (node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node- gyp-bin\\....\\node_modules\\node-gyp\\b in\\node-gyp.js" rebuild ) else (node "" rebuild )
pty.js@0.3.1 install D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\pty.js node-gyp rebuildpty.js@0.3.1 安装 D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\pty.js node-gyp 重建
D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\pty.js>if not defined npm_config_node_gyp (node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp-bin\\....\\node_modules\\node-g yp\\bin\\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR!D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\pty.js>如果没有定义 npm_config_node_gyp (node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp- bin\\....\\node_modules\\node-g yp\\bin\\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! configure error gyp ERR!
配置错误gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
堆栈错误:找不到 Python 可执行文件“python”,您可以设置 PYTHON 环境变量。 gyp ERR!
吉普错误! stack at failNoPython (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:449:14) gyp ERR!
堆栈在 failNoPython (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:449:14) gyp ERR! stack at C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:404:11 gyp ERR!
堆栈在 C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:404:11 gyp ERR! stack at C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\graceful-fs\\polyfills.js:264:29 gyp ERR!
堆栈在 C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\graceful-fs\\polyfills.js:264:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15) gyp ERR!
堆栈在 FSReqWrap.oncomplete (fs.js:123:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR!
系统 Windows_NT 6.1.7601 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!
命令 "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "重建" gyp ERR! cwd D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\pty.js gyp ERR!
cwd D:\\Users\\pjha\\AppData\\Roaming\\npm\\node_modules\\tty.js\\node_modules\\pty.js gyp ERR! node -v v6.10.2 gyp ERR!
节点 -v v6.10.2 gyp 错误! node-gyp -v v3.4.0 gyp ERR!
node-gyp -v v3.4.0 gyp 错误! not ok D:\\Users\\pjha\\AppData\\Roaming\\npm `-- (empty)
不行 D:\\Users\\pjha\\AppData\\Roaming\\npm `--(空)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "tty.js"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pty.js@0.3.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js@0.3.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pty.js
npm ERR! Or if that isn't available, you can get their info via:`enter code here`
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Praful\WorkSpaces\NodeJsWorkSpace\Test\npm-debug.log
See this issue on GitHub - #151: npm install pty.js` failed on Windows 10:在 GitHub 上查看此问题 - #151: npm install pty.js` 在 Windows 10 上失败:
And this - #54: can't install on windows:而这个 - #54:无法在 Windows 上安装:
There are some solutions that people recommend.人们推荐了一些解决方案。 It's hard to tell which one will work for you but you should find some info in the comments to those issues.
很难说哪个适合你,但你应该在对这些问题的评论中找到一些信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.