App crashing right away after deploy from Github Actions - node.js

Well, I have pushed my TypeScript project to github, and it has these scripts:
"scripts": {
"test": "jest",
"test:cov": "jest --coverage -i",
"test:unit": "jest unit --coverage -i",
"test:int": "jest int --coverage -i",
"build": "rimraf ./dist && tsc",
"start": "node ./dist/index.js",
"dev": "ts-node-dev --respawn --transpile-only --inspect -- ./src/index.ts"
}
After that, I created a github action workflow, making it run my tests and if they all pass, it deploys to heroku, but when the deployment is made, the heroku app crashes instantly.
This is the workflow:
main.yml:
name: Main workflow
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.18.1]
steps:
- uses: actions/checkout#v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node#v2.4.1
with:
node-version: ${{ matrix.node-version }}
- name: Install deps
run: yarn --frozen-lockfile
- name: Test
env:
MONGODB_URL_TEST: ${{secrets.MONGODB_URL_TEST}}
AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
run: yarn test
- name: Build the project
run: yarn build
- name: Deploy the project
if: ${{github.ref == 'refs/heads/main'}}
uses: akhileshns/heroku-deploy#v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "testjvcapi"
heroku_email: "joaovitorcasarin#hotmail.com"
env:
HD_MONGODB_URL: ${{secrets.MONGODB_URL}}
HD_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
This is the last action that I triggered: https://github.com/joaocasarin/test-selfapi/actions/runs/1365239970
This is the repo: https://github.com/joaocasarin/test-selfapi/
This is the log after the deployment to heroku:
2021-10-20T20:33:33.000000+00:00 app[api]: Build started by user *****#hotmail.com
2021-10-20T20:34:16.052764+00:00 app[api]: Release v6 created by user *****#hotmail.com
2021-10-20T20:34:16.052764+00:00 app[api]: Deploy 1192ce7c by user *****#hotmail.com
2021-10-20T20:34:16.359307+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-20T20:34:18.914264+00:00 heroku[web.1]: Starting process with command `npm start`
2021-10-20T20:34:20.660465+00:00 app[web.1]: [heroku-exec] Starting
2021-10-20T20:34:20.956196+00:00 app[web.1]:
2021-10-20T20:34:20.956213+00:00 app[web.1]: > self-api#1.0.0 start /app
2021-10-20T20:34:20.956214+00:00 app[web.1]: > node ./dist/index.js
2021-10-20T20:34:20.956214+00:00 app[web.1]:
2021-10-20T20:34:21.713756+00:00 app[web.1]: Listening on port 8260
2021-10-20T20:34:21.775734+00:00 heroku[web.1]: State changed from starting to up
2021-10-20T20:34:21.911902+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-10-20T20:34:21.912248+00:00 app[web.1]: npm ERR! errno 1
2021-10-20T20:34:21.926340+00:00 app[web.1]: npm ERR! self-api#1.0.0 start: `node ./dist/index.js`
2021-10-20T20:34:21.926408+00:00 app[web.1]: npm ERR! Exit status 1
2021-10-20T20:34:21.926490+00:00 app[web.1]: npm ERR!
2021-10-20T20:34:21.926548+00:00 app[web.1]: npm ERR! Failed at the self-api#1.0.0 start script.
2021-10-20T20:34:21.926604+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-10-20T20:34:21.933864+00:00 app[web.1]:
2021-10-20T20:34:21.933977+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-10-20T20:34:21.934035+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-10-20T20_34_21_928Z-debug.log
2021-10-20T20:34:22.121378+00:00 heroku[web.1]: Process exited with status 1
2021-10-20T20:34:22.265731+00:00 heroku[web.1]: State changed from up to crashed
2021-10-20T20:34:22.288685+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-20T20:34:24.000000+00:00 app[api]: Build succeeded
2021-10-20T20:34:24.543897+00:00 heroku[web.1]: Starting process with command `npm start`
2021-10-20T20:34:25.605048+00:00 app[web.1]: [heroku-exec] Starting
2021-10-20T20:34:25.900511+00:00 app[web.1]:
2021-10-20T20:34:25.900518+00:00 app[web.1]: > self-api#1.0.0 start /app
2021-10-20T20:34:25.900518+00:00 app[web.1]: > node ./dist/index.js
2021-10-20T20:34:25.900519+00:00 app[web.1]:
2021-10-20T20:34:26.661060+00:00 app[web.1]: Listening on port 33178
2021-10-20T20:34:26.671025+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-10-20T20:34:26.674395+00:00 app[web.1]: npm ERR! errno 1
2021-10-20T20:34:26.676324+00:00 app[web.1]: npm ERR! self-api#1.0.0 start: `node ./dist/index.js`
2021-10-20T20:34:26.676389+00:00 app[web.1]: npm ERR! Exit status 1
2021-10-20T20:34:26.676462+00:00 app[web.1]: npm ERR!
2021-10-20T20:34:26.676511+00:00 app[web.1]: npm ERR! Failed at the self-api#1.0.0 start script.
2021-10-20T20:34:26.676557+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-10-20T20:34:26.682667+00:00 app[web.1]:
2021-10-20T20:34:26.682776+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-10-20T20:34:26.682829+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-10-20T20_34_26_677Z-debug.log
2021-10-20T20:34:26.877812+00:00 heroku[web.1]: Process exited with status 1
2021-10-20T20:34:27.141848+00:00 heroku[web.1]: State changed from starting to crashed
Can someone please give me a light? This is the first time I try github actions.
Thanks
Edit.: This is the Deploy the project step information:
Run akhileshns/heroku-deploy#v3.12.12
Created and wrote to ~/.netrc
Successfully logged into heroku
› Warning: Our terms of service have changed:
› https://dashboard.heroku.com/terms-of-service
Added git remote heroku
Setting MONGODB_URL, AUTH_TOKEN and restarting testjvcapi... done, v5
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: USE_YARN_CACHE=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote: engines.yarn (package.json): unspecified (use default)
remote:
remote: Resolving node version 14.x...
remote: Downloading and installing node 14.18.1...
remote: Using default npm version: 6.14.15
remote: Resolving yarn version 1.22.x...
remote: Downloading and installing yarn (1.22.17)
remote: Installed yarn 1.22.17
remote:
remote: -----> Restoring cache
remote: - yarn cache
remote:
remote: -----> Installing dependencies
remote: Installing node modules (yarn.lock)
remote: yarn install v1.22.17
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: [3/4] Linking dependencies...
remote: [4/4] Building fresh packages...
remote: Done in 7.59s.
remote:
remote: -----> Build
remote: Running build (yarn)
remote: yarn run v1.22.17
remote: $ rimraf ./dist && tsc
remote: Done in 11.61s.
remote:
remote: -----> Pruning devDependencies
remote: yarn install v1.22.17
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: [3/4] Linking dependencies...
remote: [4/4] Building fresh packages...
remote: warning Ignored scripts due to flag.
remote: Done in 3.65s.
remote:
remote: -----> Caching build
remote: - yarn cache
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 41.9M
remote: -----> Launching...
remote: Released v6
remote: https://testjvcapi.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/testjvcapi.git
f9075d9..1192ce7 HEAD -> main

As Bertrand said, there was something wrong with the mongodb connection, so I just found that the variable MONGODB_URL was not set, only the test one was, so it was making the app crash because it was undefined for mongoose, making it exit.

Related

Problems for deploy in heroku node.js app

I cant deploy in heroku my app something wrong with node.js , i tried to delete app , did again the app, npm install, install build packs, all what i saw for internet i did but i cant resolve the problem. The error is:
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> 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): 14.x
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.16.1...
Using default npm version: 6.14.12
-----> Installing dependencies
Installing node modules
> react-redux-router#1.0.0 preinstall /tmp/build_94f5a392
> npm set audit false
> fsevents#1.2.13 install /tmp/build_94f5a392/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> node-sass#4.14.1 install /tmp/build_94f5a392/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-83_binding.node
Download complete
Binary saved to /tmp/build_94f5a392/node_modules/node-sass/vendor/linux-x64-83/binding.node
Caching binary to /tmp/npmcache.fQ3DD/_cacache/node-sass/4.14.1/linux-x64-83_binding.node
> node-sass#4.14.1 postinstall /tmp/build_94f5a392/node_modules/node-sass
> node scripts/build.js
Binary found at /tmp/build_94f5a392/node_modules/node-sass/vendor/linux-x64-83/binding.node
Testing binary
Binary is fine
> core-js#2.6.12 postinstall /tmp/build_94f5a392/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
added 1362 packages in 18.728s
-----> Build
Detected both "build" and "heroku-postbuild" scripts
Running heroku-postbuild
> react-redux-router#1.0.0 heroku-postbuild /tmp/build_94f5a392
> npm run build
> react-redux-router#1.0.0 build /tmp/build_94f5a392
> cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --color
clean-webpack-plugin: /tmp/build_94f5a392/dist has been removed.
<s> [webpack.Progress] 70% building 443/443 modules 0 active
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-redux-router#1.0.0 build: `cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --color`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-redux-router#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.fQ3DD/_logs/2021-04-21T16_54_17_773Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-redux-router#1.0.0 heroku-postbuild: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-redux-router#1.0.0 heroku-postbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.fQ3DD/_logs/2021-04-21T16_54_17_803Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
i tried all what i saw, my package.json:
{
"name": "react-redux-router",
"version": "1.0.0",
"description": "Basic skeleton codebase for React/Redux/Router applications.",
"engines": {
"node": "14.x"
},
"scripts": {
"preinstall": "npm set audit false",
"start": "webpack-dev-server --config webpack/dev.config.js --watch",
"build": "cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --color",
"heroku-postbuild": "npm run build",
"precommit": "eslint src",
"prod": "NODE_ENV=production node server.js"
},
what can i do?
Need more details?
Thanks for help
I instaled the buildpacks again and now th error changes, now is this:
code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! react-redux-router#1.0.0 build: `cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --color`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the react-redux-router#1.0.0 build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.LI5Fz/_logs/2021-04-21T18_05_53_894Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! react-redux-router#1.0.0 heroku-postbuild: `npm run build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the react-redux-router#1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.LI5Fz/_logs/2021-04-21T18_05_53_921Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 31c1685dcd402b6a2bc433e60e53fd96f074132a
remote: ! We have detected that you have triggered a build from source code with version 31c1685dcd402b6a2bc433e60e53fd96f074132a
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to funnybooks.
remote:
To https://git.heroku.com/funnybooks.git
! [remote rejected] HEAD -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/funnybooks.git'

Could not find a required file index.html - Heroku push error

I am pushing the react-node app to Heroku using Heroku CLI.
build is failing and the error is Could not find a required file index.html
I have checked all the files and everything in place
don't know what am I missing?
I am stuck here for one week.
Please help me
I am pushing the react-node app to Heroku using Heroku CLI.
build is failing and the error is Could not find a required file index.html
I have checked all the files and everything in place
don't know what am I missing?
I am stuck here for one week.
Please help me
Package.json
"main": "server.js",
"scripts": {
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
Error :
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 398 bytes | 398.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 8.9.4
remote: engines.npm (package.json): 6.2.0
remote:
remote: Resolving node version 8.9.4...
remote: Downloading and installing node 8.9.4...
remote: Bootstrapping npm 6.2.0 (replacing 5.6.0)...
remote: npm 6.2.0 installed
remote:
remote: -----> Restoring cache
remote: - node_modules
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote: audited 2601 packages in 4.802s
remote: found 0 vulnerabilities
remote:
remote: Running heroku-postbuild
remote:
remote: > devconnector#1.0.0 heroku-postbuild /tmp/build_cb13714e30f186bd579e6f8f21bf9383
remote: > NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
remote:
remote:
remote: > jss#9.8.7 postinstall /tmp/build_cb13714e30f186bd579e6f8f21bf9383/client/node_modules/jss
remote: > node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
remote:
remote: Love JSS? You can now support us on open collective:
remote: > https://opencollective.com/jss/donate
remote:
remote: > uglifyjs-webpack-plugin#0.4.6 postinstall /tmp/build_cb13714e30f186bd579e6f8f21bf9383/client/node_modules/uglifyjs-webpack-plugin
remote: > node lib/post_install.js
remote:
remote: added 1375 packages from 852 contributors and audited 13755 packages in 46.845s
remote: found 0 vulnerabilities
remote:
remote:
remote: > client#0.1.0 build /tmp/build_cb13714e30f186bd579e6f8f21bf9383/client
remote: > react-scripts build
remote:
**remote: Could not find a required file.
remote: Name: index.html**
remote: Searched in: /tmp/build_cb13714e30f186bd579e6f8f21bf9383/client/public
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! client#0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the client#0.1.0 build scr`enter code here`ipt.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.bspBQ/_logs/2018-10-14T10_57_59_194Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! devconnector#1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the devconnector#1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.bspBQ/_logs/2018-10-14T10_57_59_208Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! **Push rejected, failed to compile Node.js app.**
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to murmuring-depths-54253.
I also encountered this issue today and managed to fix it by removing /public folder from .gitignore.
Two things could be cause of this:
Probably you have /public directory specified inside your .gitignore
Case sensitive paths
more info at: https://create-react-app.dev/docs/deployment/#heroku
Possible Solution: Your file structure might be the issue
By chance do you have an 'api' folder next to your 'client' folder?
Heroku doesn't seem to play well with certain file structures (not sure why, I opened a ticket with them to inquire)
I was receiving almost the exact same error because I had most of my 'server' files within an api folder at the root.
After moving those files outside the api folder, removing my lock files, and reinstalling node modules, deployment went off without a hitch.
So, try the following:
Make sure that your file structure isn't conflicting with standard deployments (see screenshot below)
Remove your lock files and node_modules
Reinstall node_modules at root and in client
commit and and attempt another deploy -- let us know if that succeeds
As you can see, the only difference is the location of those folders within the api folder (obviously, import/require pathnames needed to be updated as well)
Failing Folder Structure
Successful Folder Structure

Build fails on Nodejs (+ React) app deployment on Heroku

I build an app to practice react with a nodejs backend. It work fine on localhost. But I needed to learn how to deploy it on Heroku. I followed Stephen Grider's Udemy course and tried to hosted it on Heroku.
But my build fails. I checked many times and ran npm install even. But I can't get it working.
This is my package.json in server
{
"name": "react-movies",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"server": "nodemon index.js",
"client": "npm run start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm insall --prefix client && npm run build --prefix client"
},
"engines": {
"node": "8.9.4",
"npm": "5.7.1"
},
"author": "pankaja92",
"license": "ISC",
"dependencies": {
"concurrently": "^3.5.1",
"moviedb-promise": "^1.2.1",
"express": "^4.16.3",
"nodemon": "^1.17.2"
}
}
And this is the build error I'm getting.
Counting objects: 25, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (25/25), 5.50 KiB | 2.75 MiB/s, done.
Total 25 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 8.9.4
remote: engines.npm (package.json): 5.7.1
remote:
remote: Resolving node version 8.9.4...
remote: Downloading and installing node 8.9.4...
remote: Bootstrapping npm 5.7.1 (replacing 5.6.0)...
remote: npm 5.7.1 installed
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (new-signature)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > nodemon#1.17.2 postinstall /tmp/build_ac7e6ff23b1b667ae4e3970742a18cc1/node_modules/nodemon
remote: > node -e "console.log('u001b[32mLove nodemon? You can now support the project via the open collective:u001b[22mu001b[39mn > u001b[96mu001b[1mhttps://opencollective.com/nodemon/donateu001b[0mn')" || exit 0
remote:
remote: Love nodemon? You can now support the project via the open collective:
remote: > https://opencollective.com/nodemon/donate
remote:
remote: added 319 packages from 194 contributors in 7.977s
remote: Running heroku-postbuild
remote:
remote: > react-movies#1.0.0 heroku-postbuild /tmp/build_ac7e6ff23b1b667ae4e3970742a18cc1
remote: > NPM_CONFIG_PRODUCTION=false npm insall --prefix client && npm run build --prefix client
remote:
remote:
remote: Usage: npm <command>
remote:
remote: where <command> is one of:
remote: access, adduser, bin, bugs, c, cache, ci, completion,
remote: config, ddp, dedupe, deprecate, dist-tag, docs, doctor,
remote: edit, explore, get, help, help-search, i, init, install,
remote: install-test, it, link, list, ln, login, logout, ls,
remote: outdated, owner, pack, ping, prefix, profile, prune,
remote: publish, rb, rebuild, repo, restart, root, run, run-script,
remote: s, se, search, set, shrinkwrap, star, stars, start, stop, t,
remote: team, test, token, tst, un, uninstall, unpublish, unstar,
remote: up, update, v, version, view, whoami
remote:
remote: npm <command> -h quick help on <command>
remote: npm -l display full usage info
remote: npm help <term> search for help on <term>
remote: npm help npm involved overview
remote:
remote: Specify configs in the ini-formatted file:
remote: /app/.npmrc
remote: or on the command line via: npm <command> --key value
remote: Config info can be viewed via: npm help config
remote:
remote: npm#5.7.1 /tmp/build_ac7e6ff23b1b667ae4e3970742a18cc1/.heroku/node/lib/node_modules/npm
remote:
remote: Did you mean one of these?
remote: install
remote: uninstall
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! react-movies#1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm insall --prefix client && npm run build --prefix client`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the react-movies#1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.31Mmf/_logs/2018-03-22T20_32_50_639Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to findthemovie.
remote:
What have I done wrong ? Why's my build is failing ?
Can anyone help me with this ?
Would put this as a comment but can't yet, check a spelling error in config file
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm insall --prefix client && npm run build --prefix client"
Ain't that supposed to be install?
npm install
> NPM_CONFIG_PRODUCTION=false npm insall --prefix client && npm run build --prefix client
should be
> NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
I believe there is a typo in your code.
It should be install instead of insall :
NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
add this code in server.js file
if (process.env.NODE_ENV === "production") {
app.use(express.static(path.join(__dirname, "client/build")));
app.get("*", (req, res) => {
res.sendFile(path.resolve(__dirname, "client", "build", "index.html"));
});
}

Error deploying Meteor app to Heroku - how to change NODE version

I received this error message when deploying a meteor app to HEROKU while the HEROKU build itself was successful:
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 believe it has to do with the version of NODE in the project being incompatible. Currently the project shows the below (I manually changed this in the project file to match a version of NODE the HEROKU command line prompted.
meteor/local/build/.node_version.txt : v8.3.0
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 8.x...
remote: Downloading and installing node 8.9.4...
remote: Using default npm version: 5.6.0
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (not-found)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > bcrypt#1.0.3 install /tmp/build_716b8c55d4775b8c4db0d8c2018f489f/node_modules/bcrypt
remote: > node-pre-gyp install --fallback-to-build
remote:
remote: [bcrypt] Success: "/tmp/build_716b8c55d4775b8c4db0d8c2018f489f/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
remote: added 195 packages in 5.765s
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Saving 2 cacheDirectories (default):
remote: - node_modules
remote: - bower_components (nothing to cache)
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 44.3M
remote: -----> Launching...
remote: Released v3
remote: https://missionary-expediters-app.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/missionary-expediters-app.git
* [new branch] master -> master
➜ Missionary-Expediters-Web-Application git:(master) heroku logs
2018-01-16T03:58:30.407001+00:00 app[api]: Initial release by user angelica#seaworthy.tech
2018-01-16T03:58:30.407001+00:00 app[api]: Release v1 created by user angelica#seaworthy.tech
2018-01-16T03:58:30.641875+00:00 app[api]: Release v2 created by user angelica#seaworthy.tech
2018-01-16T03:58:30.641875+00:00 app[api]: Enable Logplex by user angelica#seaworthy.tech
2018-01-16T03:59:43.000000+00:00 app[api]: Build started by user angelica#seaworthy.tech
2018-01-16T03:59:59.490555+00:00 app[api]: Deploy f900129c by user angelica#seaworthy.tech
2018-01-16T03:59:59.510788+00:00 app[api]: Scaled to web#1:Free by user angelica#seaworthy.tech
2018-01-16T03:59:43.000000+00:00 app[api]: Build succeeded
2018-01-16T04:00:03.035774+00:00 heroku[web.1]: Starting process with command `npm start`
2018-01-16T03:59:59.490555+00:00 app[api]: Release v3 created by user angelica#seaworthy.tech
2018-01-16T04:00:05.155112+00:00 app[web.1]: > Missionary-Expediters-Web-Application# start /app
2018-01-16T04:00:05.155090+00:00 app[web.1]:
2018-01-16T04:00:05.168004+00:00 app[web.1]: npm ERR! file sh
2018-01-16T04:00:05.155113+00:00 app[web.1]: > meteor run
2018-01-16T04:00:05.155114+00:00 app[web.1]:
2018-01-16T04:00:05.168910+00:00 app[web.1]: npm ERR! errno ENOENT
2018-01-16T04:00:05.162754+00:00 app[web.1]: sh: 1: meteor: not found
2018-01-16T04:00:05.171081+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-01-16T04:00:05.171090+00:00 app[web.1]: npm ERR!
2018-01-16T04:00:05.168907+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-01-16T04:00:05.168911+00:00 app[web.1]: npm ERR! syscall spawn
2018-01-16T04:00:05.170446+00:00 app[web.1]: npm ERR! Missionary-Expediters-Web-Application# start: `meteor run`
2018-01-16T04:00:05.171096+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-01-16T04:00:05.171091+00:00 app[web.1]: npm ERR! Failed at the Missionary-Expediters-Web-Application# start script.
2018-01-16T04:00:05.176036+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-01-16T04:00:05.175802+00:00 app[web.1]:
2018-01-16T04:00:05.176169+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-01-16T04_00_05_172Z-debug.log
2018-01-16T04:00:05.242382+00:00 heroku[web.1]: State changed from starting to crashed
2018-01-16T04:00:05.244044+00:00 heroku[web.1]: State changed from crashed to starting
2018-01-16T04:00:05.230580+00:00 heroku[web.1]: Process exited with status 1
2018-01-16T04:00:08.424396+00:00 heroku[web.1]: Starting process with command `npm start`
2018-01-16T04:00:10.625159+00:00 heroku[web.1]: State changed from starting to crashed
2018-01-16T04:00:10.612429+00:00 heroku[web.1]: Process exited with status 1
2018-01-16T04:00:10.540497+00:00 app[web.1]:
2018-01-16T04:00:10.540515+00:00 app[web.1]: > Missionary-Expediters-Web-Application# start /app
2018-01-16T04:00:10.540516+00:00 app[web.1]: > meteor run
2018-01-16T04:00:10.540517+00:00 app[web.1]:
2018-01-16T04:00:10.546730+00:00 app[web.1]: sh: 1: meteor: not found
2018-01-16T04:00:10.552451+00:00 app[web.1]: npm ERR! file sh
2018-01-16T04:00:10.552644+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-01-16T04:00:10.552794+00:00 app[web.1]: npm ERR! errno ENOENT
2018-01-16T04:00:10.552930+00:00 app[web.1]: npm ERR! syscall spawn
2018-01-16T04:00:10.554224+00:00 app[web.1]: npm ERR! Missionary-Expediters-Web-Application# start: `meteor run`
2018-01-16T04:00:10.554544+00:00 app[web.1]: npm ERR!
2018-01-16T04:00:10.554414+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-01-16T04:00:10.554639+00:00 app[web.1]: npm ERR! Failed at the Missionary-Expediters-Web-Application# start script.
2018-01-16T04:00:10.559460+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-01-16T04:00:10.559334+00:00 app[web.1]:
2018-01-16T04:00:10.554754+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-01-16T04:00:10.559520+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-01-16T04_00_10_556Z-debug.log
Any suggestions on how to get the app up and running? It works on localhost
It shouldn't be a problem with the node version, because Meteor I know supports 8.9.3, and 8.9.4 shouldn't be significantly different.
If you read the dump above you'll see these lines:
2018-01-16T04:00:05.168910+00:00 app[web.1]: npm ERR! errno ENOENT
2018-01-16T04:00:05.162754+00:00 app[web.1]: sh: 1: meteor: not found
2018-01-16T04:00:05.171081+00:00 app[web.1]: npm ERR! spawn ENOENT
Which is telling you that the command meteor is not found - perhaps you didn't install meteor to your heroku instance ? There is a guide here on how to set up Heroku - did you do something like that already?
https://medium.com/#leonardykris/how-to-run-a-meteor-js-application-on-heroku-in-10-steps-7aceb12de234
See section 5:
Set a Meteor buildpack for your Heroku instance
heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git
What is a buildpack? It’s a collection of scripts that prepares your
code for execution by the Heroku dyno manager. Heroku’s cedar stack
has no default language/framework support, so we use a buildpack to
determine/specify what kind of framework we wanted to build on.
What is cedar then? It’s a polyglot environment, which means it has
native support for many popular languages and frameworks (e.g. Rails,
Node.js, Java, PHP). It also serves as Heroku’s default runtime stack
(cedar-14).

Deploying unmodified reveal.js to Heroku

I'm having trouble getting my reveal.js-based app to work on Heroku. I decided to step back and just try to get the vanilla reveal.js code successfully deployed to Heroku. I'm having trouble with that basic step. Heroku gives an:
Application error
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 followed the Getting Started on Heroku with Node.js guide, but grabbed the reveal.js code from GitHub using the Full setup Readme steps. Here are the steps I followed along with the results from the Terminal:
$ git clone https://github.com/hakimel/reveal.js.git
Cloning into 'reveal.js'...
remote: Counting objects: 10252, done.
remote: Total 10252 (delta 0), reused 0 (delta 0), pack-reused 10252
Receiving objects: 100% (10252/10252), 7.58 MiB | 6.55 MiB/s, done.
Resolving deltas: 100% (5644/5644), done.
$ ls
moac-node-reveal moac-solo-with-php reveal.js
$ cd reveal.js/
$ ls
CONTRIBUTING.md LICENSE bower.json demo.html js package.json test
Gruntfile.js README.md css index.html lib plugin
$ npm install
npm WARN deprecated coffee-script#1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated http2#3.3.7: Use the built-in module in node 9.0.0 or newer, instead
> node-sass#4.7.2 install /Users/simon/code/reveal.js/node_modules/node-sass
> node scripts/install.js
Cached binary found at /Users/simon/.npm/node-sass/4.7.2/darwin-x64-59_binding.node
> phantomjs-prebuilt#2.1.16 install /Users/simon/code/reveal.js/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /var/folders/0n/rj76dqgx3yvd2tph37qlyvsm0000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing /Users/simon/code/reveal.js/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /var/folders/0n/rj76dqgx3yvd2tph37qlyvsm0000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1514746311473/phantomjs-2.1.1-macosx -> /Users/simon/code/reveal.js/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /Users/simon/code/reveal.js/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
> node-sass#4.7.2 postinstall /Users/simon/code/reveal.js/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/simon/code/reveal.js/node_modules/node-sass/vendor/darwin-x64-59/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
added 473 packages in 13.798s
╭─────────────────────────────────────╮
│ │
│ Update available 5.5.1 → 5.6.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯
$ npm start
> reveal.js#3.6.0 start /Users/simon/code/reveal.js
> grunt serve
(node:7173) ExperimentalWarning: The http2 module is an experimental API.
Running "connect:server" (connect) task
Started connect web server on http://localhost:8000
Running "watch" task
Waiting...
^C
╭─────────────────────────────────────╮
│ │
│ Update available 5.5.1 → 5.6.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯
$ heroku login
Enter your Heroku credentials:
Email: redacted#email.address
Password: **************
Two-factor code: ******
Logged in as redacted#email.address
$ node -v
v9.3.0
$ npm -v
5.5.1
$ git --version
git version 2.14.3 (Apple Git-98)
$ heroku create
Creating app... done, ⬢ calm-crag-42588
https://calm-crag-42588.herokuapp.com/ | https://git.heroku.com/calm-crag-42588.git
$ git push heroku master
Counting objects: 10020, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3988/3988), done.
Writing objects: 100% (10020/10020), 7.43 MiB | 677.00 KiB/s, done.
Total 10020 (delta 5525), reused 10020 (delta 5525)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): >=4.0.0
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version >=4.0.0...
remote: Downloading and installing node 9.3.0...
remote: Using default npm version: 5.5.1
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (not-found)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote: up to date in 0.09s
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Saving 2 cacheDirectories (default):
remote: - node_modules (nothing to cache)
remote: - bower_components (nothing to cache)
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 18.7M
remote: -----> Launching...
remote: Released v3
remote: https://calm-crag-42588.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/calm-crag-42588.git
* [new branch] master -> master
$ heroku ps:scale web=1
Scaling dynos... done, now running web at 1:Free
$ heroku open
$ heroku logs
2017-12-31T18:55:41.167608+00:00 app[api]: Release v2 created by user redacted#email.address
2017-12-31T18:55:40.984802+00:00 app[api]: Release v1 created by user redacted#email.address
2017-12-31T18:55:40.984802+00:00 app[api]: Initial release by user redacted#email.address
2017-12-31T18:55:41.167608+00:00 app[api]: Enable Logplex by user redacted#email.address
2017-12-31T18:56:13.000000+00:00 app[api]: Build started by user redacted#email.address
2017-12-31T18:56:20.523781+00:00 app[api]: Scaled to web#1:Free by user redacted#email.address
2017-12-31T18:56:20.502923+00:00 app[api]: Release v3 created by user redacted#email.address
2017-12-31T18:56:20.502923+00:00 app[api]: Deploy a0c01360 by user redacted#email.address
2017-12-31T18:56:13.000000+00:00 app[api]: Build succeeded
2017-12-31T18:56:22.217173+00:00 heroku[web.1]: Starting process with command `npm start`
2017-12-31T18:56:24.295551+00:00 app[web.1]: > reveal.js#3.6.0 start /app
2017-12-31T18:56:24.295401+00:00 app[web.1]:
2017-12-31T18:56:24.295552+00:00 app[web.1]: > grunt serve
2017-12-31T18:56:24.295553+00:00 app[web.1]:
2017-12-31T18:56:24.306026+00:00 app[web.1]: sh: 1: grunt: not found
2017-12-31T18:56:24.310223+00:00 app[web.1]: npm ERR! file sh
2017-12-31T18:56:24.310226+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-12-31T18:56:24.310227+00:00 app[web.1]: npm ERR! errno ENOENT
2017-12-31T18:56:24.310228+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-31T18:56:24.311279+00:00 app[web.1]: npm ERR! reveal.js#3.6.0 start: `grunt serve`
2017-12-31T18:56:24.311803+00:00 app[web.1]: npm ERR! Failed at the reveal.js#3.6.0 start script.
2017-12-31T18:56:24.311414+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-31T18:56:24.311669+00:00 app[web.1]: npm ERR!
2017-12-31T18:56:24.311943+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-12-31T18:56:24.317995+00:00 app[web.1]: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
2017-12-31T18:56:24.318729+00:00 app[web.1]:
2017-12-31T18:56:24.318964+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-12-31T18:56:24.319122+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2017-12-31T18_56_24_313Z-debug.log
2017-12-31T18:56:27.086467+00:00 heroku[web.1]: Starting process with command `npm start`
2017-12-31T18:56:24.393036+00:00 heroku[web.1]: Process exited with status 1
2017-12-31T18:56:24.405623+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-31T18:56:24.407532+00:00 heroku[web.1]: State changed from crashed to starting
2017-12-31T18:56:30.585270+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-31T18:56:30.556563+00:00 heroku[web.1]: Process exited with status 1
2017-12-31T18:56:30.393715+00:00 app[web.1]:
2017-12-31T18:56:30.393731+00:00 app[web.1]: > reveal.js#3.6.0 start /app
2017-12-31T18:56:30.393732+00:00 app[web.1]: > grunt serve
2017-12-31T18:56:30.393732+00:00 app[web.1]:
2017-12-31T18:56:30.400445+00:00 app[web.1]: sh: 1: grunt: not found
2017-12-31T18:56:30.404923+00:00 app[web.1]: npm ERR! file sh
2017-12-31T18:56:30.405234+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-12-31T18:56:30.405479+00:00 app[web.1]: npm ERR! errno ENOENT
2017-12-31T18:56:30.405725+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-31T18:56:30.409574+00:00 app[web.1]: npm ERR! reveal.js#3.6.0 start: `grunt serve`
2017-12-31T18:56:30.409737+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-31T18:56:30.410022+00:00 app[web.1]: npm ERR!
2017-12-31T18:56:30.410205+00:00 app[web.1]: npm ERR! Failed at the reveal.js#3.6.0 start script.
2017-12-31T18:56:30.410375+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-12-31T18:56:30.428235+00:00 app[web.1]: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
2017-12-31T18:56:30.429020+00:00 app[web.1]:
2017-12-31T18:56:30.429211+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-12-31T18:56:30.429337+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2017-12-31T18_56_30_412Z-debug.log
2017-12-31T18:56:36.818819+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calm-crag-42588.herokuapp.com request_id=8b23ad0b-29bd-4a6a-bbf8-cd991fdc334a fwd="47.32.63.6" dyno= connect= service= status=503 bytes= protocol=https
2017-12-31T18:56:37.254436+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calm-crag-42588.herokuapp.com request_id=8267e9aa-69ca-4998-b967-89e1db724b30 fwd="47.32.63.6" dyno= connect= service= status=503 bytes= protocol=https
Two things fixed this:
1. package.json: moved devDependencies to dependencies
"devDependencies": {
"express": "^4.16.2",
"grunt": "^1.0.1",
"grunt-autoprefixer": "^3.0.4",
"grunt-cli": "^1.2.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-cssmin": "^2.2.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-qunit": "^1.2.0",
"grunt-contrib-uglify": "^2.3.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-retire": "^1.0.7",
"grunt-sass": "^2.0.0",
"grunt-zip": "^0.17.1",
"mustache": "^2.3.0",
"socket.io": "^1.7.4"},
...became:
"devDependencies": {},
And:
"dependencies": {
"reveal-ga": "^0.1.0"}
...became:
"dependencies": {
"reveal-ga": "^0.1.0",
"express": "^4.16.2",
"grunt": "^1.0.1",
"grunt-autoprefixer": "^3.0.4",
"grunt-cli": "^1.2.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-cssmin": "^2.2.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-qunit": "^1.2.0",
"grunt-contrib-uglify": "^2.3.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-retire": "^1.0.7",
"grunt-sass": "^2.0.0",
"grunt-zip": "^0.17.1",
"mustache": "^2.3.0",
"socket.io": "^1.7.4"}
Gruntfile.js: use $PORT environment variable
var port = grunt.option('port') || 8000;
...became:
var port = grunt.option('port') || process.env.PORT || 8000;

Resources