nodeclipse无法运行package.json脚本目标

时间:2014-05-08 19:25:49

标签: nodeclipse

使用像

这样的简单包
{
  "name": "test",
  "version": "0.1.0",
  "description": "test",
  "main": "hello-world-server.njs",
  "scripts": {
    "start": "node hello-world-server.js"
  },
  "repository": "",
  "keywords": [
    "node.js",
    "eclipse",
    "nodeclipse"
  ],
  "author": "",
  "license": "MIT",
  "readmeFilename": "README.md"
}

我可以(从命令行)运行:

npm start

一切都很好。但是从eclipse(nodeclipse),使用npm ...,从运行配置中,我得到的只有:

> test@0.1.0 start /Users/chrismarx/Documents/workspaces/yardmap-3.5.0/test
> node ./hello-world-server.js

execvp(): No such file or directory

有谁知道如何解决这个问题?我刚刚将nodeclipse安装到全新安装中,我相信我已经获得了最新版本0.15.1.201404300203

2 个答案:

答案 0 :(得分:1)

通常在GUI中选择.js文件,右键单击Run As - >节点应用。
稍后可以从“运行”下拉菜单中选择

虽然npm start来自命令行。

答案 1 :(得分:1)

在您的情况下,您可以右键单击/ bin / www - >运行方式 - >节点应用