1

用一个简单的包,比如

{
  "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

4

2 回答 2

1

通常在 GUI 中选择 .js 文件,右键单击 Run As -> Node App。
稍后可以从运行下拉菜单中选择

虽然npm start将来自命令行。

于 2014-05-23T09:39:41.817 回答
1

在您的情况下,您可以右键单击 /bin/www -> Run As -> Node App。

于 2015-05-23T14:25:43.573 回答