visual studio code nodejs request'launch':无法启动目标(原因:spawn节点ENOENT)
当我使用visual studio代码来debuggingnodejs应用程序。 视觉工作室代码告诉我request 'launch': cannot launch target (reason: spawn node ENOENT)
我的nodejs版本是4.2.4
当在Windows上运行时,通过在VS代码debuggingconfiguration中指定npm.cmd
而不是npm
来pipe理这种情况
"runtimeExecutable": "npm.cmd",
这里有一些讨论
如何在node.js上debugging“错误:产生ENOENT”?
特别要检查以下几点
- 确保设置了环境variables
PATH
-
PATHEXT
环境variables,可能导致某些调用产卵不能在Windows上工作。
我在Debian Linux系统上得到这个错误。 我注意到在Windows上同样的事情工作正常。
接下来我注意到,Node.JS可执行文件在Windows上称为节点,但在Debian(以及基于Debian的系统,如Ubuntu)上称为nodejs。 所以我创build了一个别名 – 从一个根terminal,我跑了
ln -s / usr / bin / nodejs / usr / local / bin / node
这解决了这个问题。
如果在Windows操作系统上安装节点js时已经运行了Visual代码编辑器,通常会发生这种情况。 我会build议你closures你的Visual Studio代码并重新启动它。 这个问题应该消失。
如果没有做一台机器重新启动,并validationdebugging工作是否完美
- AWS Lambda copyObject“在完成请求之前退出进程”
- 节点JSmongoose不能连接到远程MongoDB服务器
- 风帆政策 – 使用variables
- 如何使用PassportauthenticationSails JS应用程序?
- lodash _.map比Node.js映射更快吗?
- node.js mongodb – collection.find()。toArray(callback)返回空
- 节点/expression4:在ajax文章上用express-validator显示错误
- couchbase服务器+ couchbase lite + couchbase syncgetway + nodejs + raspbarry pi
- graphicsmagick裁剪取决于原始图像大小(resuse readstream)