首页 文章

通过npm安装phantomjs时,“'node'不被识别为内部或外部命令”

提问于
浏览
2

我一直在使用NPM来管理我的依赖项 . 在过去,我已经让它构建得很好,但是团队做了一些最近的更改,更新了依赖项,我需要重建以确保我拥有最新的所有内容 .

当我在主目录上运行'npm install'时,它似乎很好,直到它尝试安装phantomjs@1.9.19,此时我得到以下内容:

phantomjs@1.9.19安装c:\ Users \ me \ Perforce \ drice_vir_ui \ node_modules \ phantomjs节点install.js'node'未被识别为内部或外部命令,可运行程序或批处理文件 . 错误的ERR! Windows_NT 6.1.7601 npm ERR! argv“C:\ Program Files \ nodejs \ node.exe”“C:\ Users \ me \ AppData \ Roaming \ npm \ node_modules \ npm \ bin \ npm-cli.js”“install”“phantomjs”npm ERR!节点v5.0.0 npm ERR! npm v3.3.7 npm ERR!代码ELIFECYCLE npm ERR! phantomjs@1.9.19安装:node install.js npm ERR!退出状态1 npm ERR!错误的ERR!在phantomjs@1.9.19安装脚本'node install.js'失败 . 错误的ERR!这很可能是phantomjs包的问题,npm ERR!不是与npm本身 . 错误的ERR!告诉作者你的系统失败了:npm ERR! node install.js npm ERR!您可以通过以下方式获取他们的信息:npm ERR! npm老板ls phantomjs npm ERR!上面可能有额外的日志记录输出 . 错误的ERR!请在任何支持请求中包含以下文件:

当我运行“node -v”时,我得到“v5.0.0”作为响应,所以我知道节点已正确安装 . 我一直在挖掘stackoverflow,github以及其他任何有错误线程可能有帮助的地方,但没有任何效果 . 我错过了什么?

1 回答

  • 1

    curl -L https://npmjs.org/install.sh | sh

    一旦完成,重新运行 npm install ,一切都应该修复 .

相关问题