【问题标题】:npm start works on eclipse and doesn't in visual studio codenpm start 适用于 Eclipse,不适用于 Visual Studio 代码
【发布时间】:2019-10-10 21:25:50
【问题描述】:

npm start 在 Eclipse 上运行良好,但在 Visual Studio 代码中显示以下错误:

ng2@1.0.0-SNAPSHOT 开始 E:\workspaces...

gulp buildNoRev && gulp connect | ng 服务 --proxy-config proxy.conf.json --port 4201 --base-href /transactionnel/v2/

'node' n'est pas reconnu en tant que commande interne ou externe, un program exécutable ou un fichier de commandes。 npm 错误!代码生命周期 npm 错误!错误号 1 npm 错误! ng2@1.0.0-SNAPSHOT 开始:gulp buildNoRev && gulp connect | ng serve --proxy-config proxy.conf.json --port 4201 --base-href /transactionnel/v2/ npm 错误!退出状态 1 npm 错误! npm 错误! ng2@1.0.0-SNAPSHOT 启动脚本失败。 npm 错误!这可能不是 npm 的问题。上面可能还有额外的日志输出。

npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! E:\repositories\npm_logs\2019-05-24T09_31_33_889Z-debug.log

请帮忙!

【问题讨论】:

  • 如果你打开一个命令行,然后输入npm会发生什么?
  • 'npm' n'est pas reconnu en tant que commande interne ou externe , un program executable ou un fichier de commandes

标签: eclipse visual-studio-code npm-start


【解决方案1】:

npm 未安装,或者更可能的是,它未添加到您的 Path 变量中。您必须手动添加到您的路径。看看这个thread

【讨论】:

  • 我已经有节点并将其添加到我的路径变量中,我已经安装了 npm (npm install) 但是使用 eclipse,我可以在我的项目上运行 npm start,我可以在浏览器中访问我的应用程序但现在我只想更改 IDE
  • node 是否也在你的路径中?
  • 是的,当我在 eclipse 和 vsc 上运行 node -v 时,它显示的版本 (8.9.4) 与 npm (5.6.0) 相同,但这在命令行中不起作用跨度>
  • E:\work\node8;E:\work\jdks\jdk-1.8.0_92\jre\bin;%JAVA_HOME\bin%
猜你喜欢
  • 2021-01-20
  • 2016-06-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-18
  • 1970-01-01
  • 2012-07-26
相关资源
最近更新 更多