【问题标题】:running protractor causes npm ERR! weird error 8运行量角器会导致 npm ERR!奇怪的错误8
【发布时间】:2015-09-22 04:46:14
【问题描述】:

我试图在我的操作系统(Ubuntu 14.04)上为 AngularJs 设置 nodeJs,如下:guideline for installing angular js components 但是当尝试运行最后一个命令时,发现了这个错误。谁能帮忙。

usman@usman-cs:~/angular-phonecat$ npm run protractor

angular-phonecat@0.0.0 量角器 /home/usman/angular-phonecat npm run update-webdriver

angular-phonecat@0.0.0 preupdate-webdriver /home/usman/angular-phonecat npm 安装

angular-phonecat@0.0.0 安装后 /home/usman/angular-phonecat 凉亭安装

angular-phonecat@0.0.0 update-webdriver /home/usman/angular-phonecat webdriver-manager 更新

selenium 独立版是最新的。 chromedriver 是最新的。

angular-phonecat@0.0.0 量角器 /home/usman/angular-phonecat 量角器测试/protractor-conf.js

Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0
usman@usman-cs:~/angular-phonecat$ 

【问题讨论】:

  • ENOENT 错误一般是因为没有找到东西。错误说您可能有一个遗留节点二进制文件,并且 npm 可能正在寻找未找到的东西。检查您的安装是否正常
  • 您的路径上可能安装了错误的“节点”二进制文件。 which nodewhere node 说什么? (或者,如果您运行 node,您会收到 nodejs 提示或其他提示吗?)如错误所示,请阅读 /usr/share/doc/nodejs/README.Debian

标签: angularjs node.js npm protractor


【解决方案1】:

我认为你应该在项目目录上运行npm install。 那应该安装所有必需的依赖项。如果这不起作用,那么您的 package.json 文件中缺少依赖项。 我按照教程操作应该没有问题。

【讨论】:

    猜你喜欢
    • 2021-07-29
    • 2015-08-05
    • 1970-01-01
    • 2015-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多