nuxt-community / adonuxt-template

[Deprecated] Starter template for Nuxt.js with AdonisJS.
451 stars 61 forks source link

adonux app works great in local development but when deploying to heroku it gives error #99

Closed hkmsadek closed 6 years ago

hkmsadek commented 6 years ago

Please see the error. It's a long one but may it complains about .env file I am not sure. Can anyone help please> 2018-04-28T02:46:08.400072+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/.env' 2018-04-28T02:46:08.400074+00:00 app[web.1]: 2018-04-28T02:46:08.400075+00:00 app[web.1]: 2018-04-28T02:46:08.400078+00:00 app[web.1]: 1 Env.load 2018-04-28T02:46:08.400079+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/src/Env/index.js:100 2018-04-28T02:46:08.400081+00:00 app[web.1]: 2018-04-28T02:46:08.400083+00:00 app[web.1]: 2 new Env 2018-04-28T02:46:08.400085+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/src/Env/index.js:41 2018-04-28T02:46:08.400086+00:00 app[web.1]: 2018-04-28T02:46:08.400088+00:00 app[web.1]: 3 Object.app.singleton [as closure] 2018-04-28T02:46:08.400090+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/providers/AppProvider.js:29 2018-04-28T02:46:08.400092+00:00 app[web.1]: 2018-04-28T02:46:08.400094+00:00 app[web.1]: 4 Ioc._resolveBinding 2018-04-28T02:46:08.400096+00:00 app[web.1]: /app/node_modules/@adonisjs/fold/src/Ioc/index.js:231 2018-04-28T02:46:08.400097+00:00 app[web.1]: 2018-04-28T02:46:08.400099+00:00 app[web.1]: 5 Ioc.use 2018-04-28T02:46:08.400100+00:00 app[web.1]: /app/node_modules/@adonisjs/fold/src/Ioc/index.js:731 2018-04-28T02:46:08.400102+00:00 app[web.1]: 2018-04-28T02:46:08.400104+00:00 app[web.1]: 6 AppProvider.boot 2018-04-28T02:46:08.400106+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/providers/AppProvider.js:322 2018-04-28T02:46:08.400107+00:00 app[web.1]: 2018-04-28T02:46:08.400109+00:00 app[web.1]: 7 _.filter.map 2018-04-28T02:46:08.400111+00:00 app[web.1]: /app/node_modules/@adonisjs/fold/src/Registrar/index.js:147 2018-04-28T02:46:08.400113+00:00 app[web.1]: 2018-04-28T02:46:08.400114+00:00 app[web.1]: 8 arrayMap 2018-04-28T02:46:08.400116+00:00 app[web.1]: /app/node_modules/lodash/lodash.js:631 2018-04-28T02:46:08.400117+00:00 app[web.1]: 2018-04-28T02:46:08.410778+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2018-04-28T02:46:08.411101+00:00 app[web.1]: npm ERR! errno 1 2018-04-28T02:46:08.412785+00:00 app[web.1]: npm ERR! adonuxt@1.0.0 start:node server.js 2018-04-28T02:46:08.413168+00:00 app[web.1]: npm ERR! 2018-04-28T02:46:08.412937+00:00 app[web.1]: npm ERR! Exit status 1 2018-04-28T02:46:08.413327+00:00 app[web.1]: npm ERR! Failed at the adonuxt@1.0.0 start script. 2018-04-28T02:46:08.413460+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-04-28T02:46:08.422463+00:00 app[web.1]: 2018-04-28T02:46:08.422645+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-04-28T02:46:08.422809+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-04-28T02_46_08_415Z-debug.log 2018-04-28T02:46:08.486176+00:00 heroku[web.1]: Process exited with status 1 2018-04-28T02:46:08.526869+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-28T02:46:08.532228+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-28T02:46:16.345220+00:00 heroku[web.1]: Starting process with commandnpm start 2018-04-28T02:46:18.797947+00:00 app[web.1]: 2018-04-28T02:46:18.943979+00:00 app[web.1]: running 2018-04-28T02:46:18.797979+00:00 app[web.1]: > adonuxt@1.0.0 start /app 2018-04-28T02:46:18.797980+00:00 app[web.1]: > node server.js 2018-04-28T02:46:18.797982+00:00 app[web.1]: 2018-04-28T02:46:19.282450+00:00 app[web.1]: { Error: ENOENT: no such file or directory, open '/app/.env' 2018-04-28T02:46:19.282521+00:00 app[web.1]: at Env.load (/app/node_modules/@adonisjs/framework/src/Env/index.js:100:41) 2018-04-28T02:46:19.282516+00:00 app[web.1]: at Object.fs.openSync (fs.js:646:18) 2018-04-28T02:46:19.282523+00:00 app[web.1]: at new Env (/app/node_modules/@adonisjs/framework/src/Env/index.js:41:22) 2018-04-28T02:46:19.282519+00:00 app[web.1]: at Object.fs.readFileSync (fs.js:551:33) 2018-04-28T02:46:19.282529+00:00 app[web.1]: at Object.app.singleton [as closure] (/app/node_modules/@adonisjs/framework/providers/AppProvider.js:29:14) 2018-04-28T02:46:19.282531+00:00 app[web.1]: at Ioc._resolveBinding (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:231:68) 2018-04-28T02:46:19.282533+00:00 app[web.1]: at Ioc.use (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:731:19) 2018-04-28T02:46:19.282538+00:00 app[web.1]: at Module._compile (module.js:652:30) errno: -2, code: 'ENOENT', syscall: 'open', path: '/app/.env' } 2018-04-28T02:46:19.282535+00:00 app[web.1]: at Ioc.use (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:735:19) 2018-04-28T02:46:19.282536+00:00 app[web.1]: at Object.<anonymous> (/app/app/Services/Nuxt.js:3:13) 2018-04-28T02:46:19.290889+00:00 app[web.1]: 2018-04-28T02:46:19.290895+00:00 app[web.1]: 2018-04-28T02:46:19.290896+00:00 app[web.1]: 2018-04-28T02:46:19.290893+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/.env' 2018-04-28T02:46:19.290897+00:00 app[web.1]: 1 Env.load 2018-04-28T02:46:19.290899+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/src/Env/index.js:100 2018-04-28T02:46:19.290900+00:00 app[web.1]: 2018-04-28T02:46:19.290904+00:00 app[web.1]: 2018-04-28T02:46:19.290902+00:00 app[web.1]: 2 new Env 2018-04-28T02:46:19.290903+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/src/Env/index.js:41 2018-04-28T02:46:19.290909+00:00 app[web.1]: 2018-04-28T02:46:19.290912+00:00 app[web.1]: 4 Ioc._resolveBinding 2018-04-28T02:46:19.290906+00:00 app[web.1]: 3 Object.app.singleton [as closure] 2018-04-28T02:46:19.290908+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/providers/AppProvider.js:29 2018-04-28T02:46:19.290913+00:00 app[web.1]: /app/node_modules/@adonisjs/fold/src/Ioc/index.js:231 2018-04-28T02:46:19.290921+00:00 app[web.1]: 6 AppProvider.boot 2018-04-28T02:46:19.290915+00:00 app[web.1]: 2018-04-28T02:46:19.290918+00:00 app[web.1]: /app/node_modules/@adonisjs/fold/src/Ioc/index.js:731 2018-04-28T02:46:19.290917+00:00 app[web.1]: 5 Ioc.use 2018-04-28T02:46:19.290919+00:00 app[web.1]: 2018-04-28T02:46:19.290923+00:00 app[web.1]: /app/node_modules/@adonisjs/framework/providers/AppProvider.js:322 2018-04-28T02:46:19.290926+00:00 app[web.1]: 7 _.filter.map 2018-04-28T02:46:19.290927+00:00 app[web.1]: /app/node_modules/@adonisjs/fold/src/Registrar/index.js:147 2018-04-28T02:46:19.290924+00:00 app[web.1]: 2018-04-28T02:46:19.290929+00:00 app[web.1]: 2018-04-28T02:46:19.290930+00:00 app[web.1]: 8 arrayMap 2018-04-28T02:46:19.290932+00:00 app[web.1]: /app/node_modules/lodash/lodash.js:631 2018-04-28T02:46:19.300545+00:00 app[web.1]: npm ERR! errno 1 2018-04-28T02:46:19.290933+00:00 app[web.1]: 2018-04-28T02:46:19.300118+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2018-04-28T02:46:19.302677+00:00 app[web.1]: npm ERR! 2018-04-28T02:46:19.302166+00:00 app[web.1]: npm ERR! adonuxt@1.0.0 start:node server.js 2018-04-28T02:46:19.302934+00:00 app[web.1]: npm ERR! Failed at the adonuxt@1.0.0 start script. 2018-04-28T02:46:19.302349+00:00 app[web.1]: npm ERR! Exit status 1 2018-04-28T02:46:19.303174+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-04-28T02:46:19.308161+00:00 app[web.1]: 2018-04-28T02:46:19.308393+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-04-28T02:46:19.308548+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-04-28T02_46_19_305Z-debug.log 2018-04-28T02:46:19.412283+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-28T02:46:19.367599+00:00 heroku[web.1]: Process exited with status 1 2018-04-28T02:46:29.666732+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=familybazar.herokuapp.com request_id=e3c7f50d-5715-49df-93de-d2bad92b995b fwd="27.147.226.94" dyno= connect= service= status=503 bytes= protocol=https 2018-04-28T02:46:30.263413+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=familybazar.herokuapp.com request_id=f9695341-b9ba-45a1-8963-8a339d39ac38 fwd="27.147.226.94" dyno= connect= service= status=503 bytes= protocol=https 2018-04-28T02:46:30.816586+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=familybazar.herokuapp.com request_id=2a006c8d-5463-4ca7-b59e-1db7eb2d9ccc fwd="27.147.226.94" dyno= connect= service= status=503 bytes= protocol=https

This question is available on Nuxt.js community (#c80)