Ben Heroku mt uygulamanın dağıtımını çalışıyorum ama her zaman aynı hatayı alıyorum: Ben de benzer taleplerde okurkenHeroku dağıtın Hata: bulamıyor modülü '/app/index.js'
2016-08-18T10:16:10.988982+00:00 heroku[web.1]: Starting process with command `node index.js`
2016-08-18T10:16:13.180369+00:00 app[web.1]: module.js:341
2016-08-18T10:16:13.180389+00:00 app[web.1]: throw err;
2016-08-18T10:16:13.180390+00:00 app[web.1]: ^
2016-08-18T10:16:13.180391+00:00 app[web.1]:
2016-08-18T10:16:13.180392+00:00 app[web.1]: Error: Cannot find module '/app/index.js'
2016-08-18T10:16:13.180393+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:339:15)
2016-08-18T10:16:13.180394+00:00 app[web.1]: at Function.Module._load (module.js:290:25)
2016-08-18T10:16:13.180394+00:00 app[web.1]: at Function.Module.runMain (module.js:447:10)
2016-08-18T10:16:13.180399+00:00 app[web.1]: at node.js:405:3
2016-08-18T10:16:13.271966+00:00 heroku[web.1]: Process exited with status 1
2016-08-18T10:16:13.273383+00:00 heroku[web.1]: State changed from starting to crashed
Ben Aşağıdaki kodu içeren bir Procfile zaten ekledim: web: node index.js
, ama yine de aynı sorun var.
Herkes sorunudur bir fikrin var? Herhangi bir rehberlik büyük takdir edilecektir. Önceden teşekkürler!
nasıl 'düğüm index.js' gibi uygulamanızı? Başlatırım? – Helen
Bir Procfile dosyası düzenledim ve yazımda yazdığım kuralı belirledim. Ardından uygulamayı komut satırı başlatması 'heroku restart' ile veya doğrudan taahhüt aşamasında başlatıyorum. Neyse ki çalıştırılan komutun "node index.js" – trauma
olduğunu düşünüyorsanız, genellikle uygulamanızı yerel olarak "node index.js" veya "node server/index.js" olarak başlatırsanız Procfile – Helen