, also versuche ich meine Nodejs-Anwendung auf Heroku zu implementieren.
Ich habe das Startskript in package.json
Fehlendes Skript: Beginnen Sie mit der Bereitstellung von Nodejs auf Heroku
"scripts": {
"test": "./node_modules/.bin/mocha -r mocha-cakes",
"start": "rm -r -f database/test.db && node app.js",
"start-win": "del database\\test.db && node app.js"
}
ich auch web: rm -r -f database/test.db && node app.js
zum Procfile
hinzugefügt haben
jedoch noch meine dyno mit dem folgenden Protokollfehler stürzt:
2016-06-25T12:27:58.216435+00:00 heroku[web.1]: Starting process with command `npm start`
2016-06-25T12:28:00.503447+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-06-25T12:28:00.502867+00:00 app[web.1]: npm ERR! Linux 3.13.0-85-generic
2016-06-25T12:28:00.504156+00:00 app[web.1]: npm ERR! npm v3.8.6
2016-06-25T12:28:00.503707+00:00 app[web.1]: npm ERR! node v5.11.1
2016-06-25T12:28:00.506550+00:00 app[web.1]: npm ERR! missing script: start
2016-06-25T12:28:00.506746+00:00 app[web.1]: npm ERR!
2016-06-25T12:28:00.506912+00:00 app[web.1]: npm ERR! <https://github.com/npm/npm/issues>
2016-06-25T12:28:00.516583+00:00 app[web.1]:
2016-06-25T12:28:00.516795+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-06-25T12:28:00.516913+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-06-25T12:28:00.506796+00:00 app[web.1]: npm ERR! If you need help, you may report this error at:
2016-06-25T12:28:00.505628+00:00 app[web.1]:
2016-06-25T12:28:01.445657+00:00 heroku[web.1]: Process exited with status 1
2016-06-25T12:28:01.461079+00:00 heroku[web.1]: State changed from starting to crashed
2016-06-25T12:28:01.461867+00:00 heroku[web.1]: State changed from crashed to starting
2016-06-25T12:28:04.433811+00:00 heroku[web.1]: Starting process with command `npm start`
ich überprüft haben mit den anderen SO-Fragen und keiner der Antworten hat mein Problem gelöst. Ich habe alles versucht, was die anderen Beiträge empfohlen haben, aber noch keinen Erfolg gefunden.
Here is the link to my repo if you want to see the source code.
wo ist deine 'procfile'? – Gintoki
@John es ist in der Wurzel der Anwendung. (selbe Stelle wie die package.json Datei) – HPSS
Welche Art von DB benutzen Sie? – sznrbrt