samedi 31 mars 2018

"Application Error" when deploying with Heroku for node

I managed to finally make a running client-server easy app in local (after weeks of trying) and... I tried to give Heroku a try, so my last server was so confusing and frustrating. It seemed it was working but... after an "okay" deploy, the web shows "An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.".

I found things like allowing to run in process.env.PORT and not only 8080 port, fixed it, but still the same mistake, though still working in local. Any advice?

The log of the deploy...

-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)

       Resolving node version 8.x...
       Downloading and installing node 8.11.1...
       Using default npm version: 5.6.0
-----> Restoring cache
       Loading 2 from cacheDirectories (default):
       - node_modules
       - bower_components (not cached - skipping)
-----> Building dependencies
       Installing node modules (package.json + package-lock)
       up to date in 3.888s
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Pruning devDependencies
       Skipping because npm 5.6.0 sometimes fails when running 'npm prune' due to a known issue
       https://github.com/npm/npm/issues/19356

       You can silence this warning by updating to at least npm 5.7.1 in your package.json
       https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version
-----> Build succeeded!
-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
       Done: 19.4M
-----> Launching...
       Released v5
       https://myweb.herokuapp.com/ deployed to Heroku




Aucun commentaire:

Enregistrer un commentaire