当前位置: 首页 > 知识库问答 >
问题:

无法运行npm命令“npm install-g tty.js”。

刁钧
2023-03-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 rebuild 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_modules\bin\node-gyp.js”rebuild)其他(node“配置错误gyp错误!堆栈错误:找不到Python可执行文件“Python”,可以设置Python env变量。gyp err!failNoPython处的堆栈(C:\ProgramFiles\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)gyp错误!C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11gyp错误!堆栈在C:\Program Files\nodejs\node_module\npm\node_module\graceful-fs\polyfills.js:264:29 gyp err!在fsreqwrap.oncomplete(fs.js:123:15)处堆栈错误!系统Windows_NT 6.1.7601 gyp错误!命令“C:\Program Files\nodejs\node.exe”“C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js”“rebuild”gyp错误!cwd d:\users\pjha\appdata\roaming\npm\node_modules\tty.js\node_modules\pty.js gyp err!node-v v6.10.2 gyp err!node-gyp-v v3.4.0 gyp错误!不确定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

共有1个答案

赫连俊悟
2023-03-14

请参阅GitHub-#151:npm在Windows 10上安装pty.js`失败:

  • https://github.com/chjj/pty.js/issues/151

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

  • https://github.com/chjj/pty.js/issues/54

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

 类似资料:
  • =D:\Users\pjha\AppData\Roaming\npm\node\u modules\tty。js\node\u模块\ws (节点gyp重建2

  • 问题内容: 我尝试使用Jekyll新命令,但是它不起作用,并在出现错误后出现。 我正在使用Mac OS X 10.8.5 Mountain Lion。 但这对我的情况不起作用。我卸载并重新安装了json,但没有任何反应。如果您知道其他解决方案,请告诉我。自本周初以来,我一直在解决这个问题。 我的宝石清单和宝石环境如下。 请给我建议以帮助我。谢谢! 3月7日更新。 以防万一您想查看自制软件列表, 2

  • 问题内容: 我试图从Java 运行命令而没有成功。这是我的Java代码: 我也尝试过: 问题是,如果我打印出的内容并在终端中运行它,它将起作用。由于某种原因,它只是不从Java执行。更清楚地说,当我直接从终端运行命令时,“ items.xml”文件就会更改。当我从Java运行它时,文件不会更改。我已验证该命令正确无误,如下所示。 我想念什么吗? cmd的输出是 **编辑 我根据以下评论进行了以下更

  • 问题内容: 试图安装elasticsearch并在我的dockerfile中遇到错误。似乎无法运行bin。 docker的新事物,因此将不胜感激任何帮助。我正在运行root用户,因此无需在任何这些命令前添加sudo。 问题答案: 像这样安装密钥似乎存在问题。这里和这里都有类似的问题。 建议的解决方案是像这样拆分命令: 就您而言,我怀疑命令的输出不是关键。可能是其他原因(例如代理响应)或错误。尝试删

  • myStr是上面我要执行的整个命令吗? 我已经尝试过的事情: 给了我一个错误: 它运行起来像一个魅力,但不是通过runtime.exec()。

  • 我对gradle和npm都是新手,我正在尝试启动并运行一个Grails3-AngularJS2示例应用程序。 这是应用程序https://github.com/agileorbit/grails3-angular2-starter 当我尝试并运行该应用程序时,我得到以下异常,似乎发生在这里