【问题标题】:Unable to run npm command "npm install -g tty.js".无法运行 npm 命令“npm install -g tty.js”。
【发布时间】:2017-09-14 09:33:14
【问题描述】:
***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

(node-gyp 重建 2> builderror.log) || (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" 重建 ) 否则 (节点 "" 重建 )
pty.js@0.3.1 安装 D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\pty.js 节点 gyp 重建
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" 重建 ) 否则 (节点 "" 重建 ) 吉普错误!配置错误 吉普错误!堆栈错误:找不到 Python 可执行文件“python”,您可以设置 PYTHON 环境变量。 吉普错误!堆栈在 failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14) 吉普错误!堆栈在 C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11 吉普错误!堆栈在 C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29 吉普错误!堆栈在 FSReqWrap.oncomplete (fs.js:123:15) 吉普错误!系统 Windows_NT 6.1.7601 吉普错误!命令“C:\Program Files\nodejs\node.exe”“C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js”“重建” 吉普错误! cwd D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\pty.js 吉普错误!节点-v v6.10.2 吉普错误!节点gyp -v v3.4.0 吉普错误!不好 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

【问题讨论】:

    标签: javascript node.js npm tty adobe-brackets


    【解决方案1】:

    在 GitHub 上查看此问题 - #151: npm install pty.js` 在 Windows 10 上失败:

    还有这个 - #54: 无法安装在 Windows 上:

    人们推荐了一些解决方案。很难说哪一个对你有用,但你应该在 cmets 中找到一些关于这些问题的信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-04
      • 2017-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-04
      • 2018-06-27
      相关资源
      最近更新 更多