首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法运行节点js seneca微服务

无法运行节点js seneca微服务
EN

Stack Overflow用户
提问于 2016-04-15 04:50:05
回答 1查看 323关注 0票数 0

我是节点js的新手。我尝试使用seneca框架运行我的第一个节点微服务。但它显示了以下错误

代码语言:javascript
复制
> npm ERR! Linux 4.2.0-16-generic
> 
> npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "start"
> 
> npm ERR! node v5.10.1
> 
> npm ERR! npm  v3.8.6
> 
> npm ERR! code ELIFECYCLE
> 
> npm ERR! myproject@0.0.1 start: `node server.js`
> 
> npm ERR! Exit status 2
> 
> npm ERR! 
> 
> npm ERR! Failed at the myproject@0.0.1 start script 'node server.js'.
> 
> npm ERR! Make sure you have the latest version of node.js and npm 
> installed.
> 
> npm ERR! If you do, this is most likely a problem with the myproject
> package,
> 
> npm ERR! not with npm itself.
> 
> npm ERR! Tell the author that this fails on your system:
> 
> npm ERR!     node server.js
> 
> npm ERR! You can get information on how to open an issue for this
> project with:
> 
> npm ERR!     npm bugs myproject
> 
> npm ERR! Or if that isn't available, you can get their info via:
> 
> npm ERR!     npm owner ls myproject
> 
> npm ERR! There is likely additional logging output above.
> 
> 
> npm ERR! Please include the following file with any support request:
> 
> npm ERR!     ~/Desktop/micro services/myproject/npm-debug.log

我使用Seneca.js约曼生成器来创建这个项目。请大家帮帮我。

我的项目指导看起来像下面的结构

代码语言:javascript
复制
        test-seneca
        |
        |-- client
        |   |-- css
        |   |-- js
        |   |-- partials
        |   |-- index.html
        |-- server
        |   |-- api.js
        |-- test
        |   |-- functional
        |-- bower.json
        |-- package.json
        |-- server.js 

我的package.json是

代码语言:javascript
复制
{

  "name": "myproject",

  "version": "0.0.1",

  "scripts": {

    "postinstall": "./node_modules/.bin/webdriver-manager update --standalone && ./node_modules/.bin/bower install",

    "test": "./node_modules/.bin/protractor test/functional/protractor.conf.js"

  },

  "dependencies": 
{

 "async": "^0.9.0",

    "hapi": "~8.2.0",

    "hapi-seneca": "^1.0.3",

    "seneca": "git://github.com/rjrodger/seneca.git",

    "seneca-account": "^0.1.8",

    "seneca-auth": "git://github.com/rjrodger/seneca-auth.git",

    "seneca-card": "^0.1.3",

    "seneca-project": "^0.1.4",

    "seneca-user": "~0.2.10"

  },

  "devDependencies": {

    "protractor": "~1.7.0",

    "bower": "~1.3.12"

  }

}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-04-15 05:14:49

它失败的原因是因为yeoman生成器无法安装依赖项,但是失败了。

如果您查看package.json内部,您可以看到seneca-authseneca的依赖项指向不存在的回购协议。请更新它们,然后再次运行npm install

编辑

我建议您不要使用这个yeoman生成器。它已经过时了,可能在节点版本上也会失败。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36638486

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档