2017-06-06 16 views
3

私はローカルホストでmeanjs 0.4.0を試してみましたが、うまく動作しますが、私はheroku link to appにデプロイして "サインアップ"オプションを試してみますコンソール:meanjs 0.4.0がHerokuにデプロイされていない場合

POST https://meanjsapptest.herokuapp.com/api/auth/signup 503 (Service Unavailable) 

と私は私が得るCLIでのCOMANDのHerokuのログ書くとき:

2017-06-06T04:15:35.152983+00:00 app[web.1]: (node:16) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html 
2017-06-06T04:15:35.153005+00:00 app[web.1]: crypto.js:635 
2017-06-06T04:15:35.153006+00:00 app[web.1]: throw new TypeError(
2017-06-06T04:15:35.153006+00:00 app[web.1]:^
2017-06-06T04:15:35.153007+00:00 app[web.1]: 
2017-06-06T04:15:35.153008+00:00 app[web.1]: TypeError: The "digest" argument is required and must not be undefined 
2017-06-06T04:15:35.153009+00:00 app[web.1]: at pbkdf2 (crypto.js:635:11) 
2017-06-06T04:15:35.153010+00:00 app[web.1]: at Object.exports.pbkdf2Sync (crypto.js:628:10) 
2017-06-06T04:15:35.153012+00:00 app[web.1]: at model. (/app/modules/users/server/models/user.server.model.js:112:26) 
2017-06-06T04:15:35.153011+00:00 app[web.1]: at model.UserSchema.methods.hashPassword (/app/modules/users/server/models/user.server.model.js:123:19) 
2017-06-06T04:15:35.153013+00:00 app[web.1]: at _next (/app/node_modules/hooks-fixed/hooks.js:62:30) 
2017-06-06T04:15:35.153013+00:00 app[web.1]: at fnWrapper (/app/node_modules/hooks-fixed/hooks.js:186:8) 
2017-06-06T04:15:35.153014+00:00 app[web.1]: at model. (/app/node_modules/mongoose/lib/plugins/saveSubdocs.js:20:7) 
2017-06-06T04:15:35.153014+00:00 app[web.1]: at _next (/app/node_modules/hooks-fixed/hooks.js:62:30) 
2017-06-06T04:15:35.153015+00:00 app[web.1]: at fnWrapper (/app/node_modules/hooks-fixed/hooks.js:186:8) 
2017-06-06T04:15:35.153015+00:00 app[web.1]: at /app/node_modules/mongoose/lib/plugins/validateBeforeSave.js:33:13 
2017-06-06T04:15:35.153016+00:00 app[web.1]: at /app/node_modules/kareem/index.js:131:16 
2017-06-06T04:15:35.153016+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:95:7) 
2017-06-06T04:15:35.153017+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:161:9) 
2017-06-06T04:15:35.167579+00:00 app[web.1]: error: Forever detected script exited with code: 1 
2017-06-06T04:15:35.173500+00:00 app[web.1]: error: Script restart attempt #1 
2017-06-06T04:15:35.292903+00:00 app[web.1]: 
2017-06-06T04:15:35.294191+00:00 app[web.1]: 
2017-06-06T04:15:35.310954+00:00 app[web.1]: + Error: Certificate file or key file is missing, falling back to non-SSL mode 
2017-06-06T04:15:35.311037+00:00 app[web.1]: To create them, simply run the following from your shell: sh ./scripts/generate-ssl-certs.sh 
2017-06-06T04:15:35.311039+00:00 app[web.1]: 
2017-06-06T04:15:35.916892+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials. 

をHerokuのは、エラーが私の中にあるタールを教えサポートしているので、私は今何をすべきか分かりませんコードは変わっていません。

CLI screenshot

答えて

4

ただ、この問題を抱えていました。 package.json>エンジンで優先ノードのバージョンを強制することで修正できました。

我々は以前

"node": ">=0.10.0" 

でそれを持っていた私たちは、

"node": "6.6.0" 

にそれを変更し、その後、Herokuのにそれをプッシュし、それは問題を修正しました。

全くわからない何の問題があるが、我々は、ノードのバージョンが問題だったと信じて私たちを導く、このリンクが見つかりました:

https://github.com/nodejs/node/wiki/Breaking-changes-between-v4-LTS-and-v6-LTS#crypto

+0

あなたは正しかったし。私は "package.json"のノードのバージョンを変更し、今は正常に動作します。 – Edercillo

+0

偉大な - あなたは答えを受け入れるか? – mike

関連する問題