以下是我的要点:https://gist.github.com/AustinG08/9065353 类似的错误消息:https://github.com/nodejitsu/jitsu/issues/493
我克隆了mean.io样板。我没有看到package.json文件有什么问题。我已经尝试实现类似错误消息中提到的内容,但我想我太新了。这是我的第一篇stackoverflow帖子。请帮忙。
*编辑以获取更多详细信息: 我做github.com/linnovate/mean的git克隆 - mean.io堆栈。我可以在本地运行它就好了。但是我想将它部署到我的nodejitsu帐户。我在命令行中运行'jitsu deploy',我得到了我链接的要点。在package.json的scripts部分中,我尝试将“start”:“node node_modules / grunt-cli / bin / grunt”更改为“start”:“node server.js”,基于我找到的类似错误消息但是无济于事,同样的事情发生了。
答案 0 :(得分:2)
由于您的建议,我解决了这个问题,但由于您从未发布过我的package.json
文件,因此我在此处输入了更多用户,这些用户可能会遇到同样的问题:
{
"name": "mean",
"description": "MEAN - A fullStack javascript framework powered by MongoDB, ExpressJS, AngularJS, NodeJS.",
"version": "0.1.2-2",
"private": false,
"repository": {
"type": "git",
"url": "https://github.com/linnovate/mean.git"
},
"engines": {
"node": "0.10.x",
"npm": "1.3.x"
},
"scripts": {
"start": "node server.js",
"test": "node node_modules/grunt-cli/bin/grunt test",
"postinstall": "node node_modules/bower/bin/bower install"
},
"dependencies": {
"express": "~3.4.7",
"bower": "~1.2.8",
"grunt-cli": "~0.1.11",
"connect-mongo": "~0.4.0",
"connect-flash": "~0.1.1",
"consolidate": "~0.10.0",
"swig": "~1.3.2",
"mongoose": "~3.8.3",
"passport": "~0.1.18",
"passport-local": "~0.1.6",
"passport-facebook": "~1.0.2",
"passport-twitter": "~1.0.2",
"passport-github": "~0.1.5",
"passport-google-oauth": "~0.1.5",
"passport-linkedin": "~0.1.3",
"lodash": "~2.4.1",
"forever": "~0.10.11",
"view-helpers": "~0.1.4",
"mean-logger": "0.0.1"
},
"devDependencies": {
"grunt-env": "~0.4.1",
"grunt-cli": "~0.1.11",
"grunt-contrib-watch": "latest",
"grunt-contrib-jshint": "latest",
"grunt-karma": "~0.6.2",
"grunt-nodemon": "0.2.0",
"grunt-concurrent": "latest",
"grunt-mocha-test": "latest",
"karma": "~0.10.4",
"karma-coffee-preprocessor": "~0.1.0",
"karma-coverage": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-firefox-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.3",
"karma-requirejs": "~0.2.0",
"karma-phantomjs-launcher": "~0.1.0",
"forever": "~0.10.11",
"supertest": "0.8.2",
"should": "2.1.1"
},
"subdomain": "hitman666-mean2"
}
进行此更改后,我再次部署了我的应用程序,一切都没有出错,但是当我在Nodejitsu上浏览它时出现错误:502 Reached max retries limit
。
我意识到我没有正确的MongoDB连接字符串,为了更改它,我必须编辑production.js
文件夹中的文件config/env/
。我从Nodejitsu的管理仪表板复制了MongoDB连接字符串(我写了关于如何在我的博客文章Getting started with Nodejitsu on Windows by deploying a MEN framework上设置它)。
在此更改之后,我再次部署了我的应用程序,现在一切正常,是的!
P.S。如果有人有兴趣,关于我如何做到这一点的整篇博文都在这里:Deploying MEAN.io to Nodejitsu from Windows machine
答案 1 :(得分:1)
OK!好吧,感谢#node.js频道的帮助,我把它部署在nodejitsu上。它的要点是我必须将所有咕噜声,业力和永远的依赖关系移动到package.json文件中的devDependencies,并将我的开始更改为“节点服务器”。