" npm ERR! missing script: start" at Heroku despite set up in package.json and Procfile

Corey Hart

I´ve been googling around to try and solve this problem. I´ve modified package.json to look like this:

{
  "name": "webrtc-chat",
  "version": "1.0.0",
  "description": "Simple chat app using WebRTC",
  "main": "index.html",
  "scripts": {
   "start": "node server/server.js", 
   "test": "echo \"Error: no test specified\" && exit 1"
      },
  "author": "Sher Minn Chong",
  "license": "ISC",
  "devDependencies": {
    "grunt": "^0.4.5",
     "grunt-contrib-watch": "^0.6.1",
     "grunt-serve": "^0.1.6",
     "node-static": "^0.7.7"
  },
  "dependencies": {
   "node-static": "^0.7.7",
    "socket.io": "^1.3.6"
  }

}

And Procfile:

web: node server/server.js

Indeed I have server.js in the folder under the root server. I tried with git push -f heroku master when I´d updated the script, then used to destroy to completely wipe the project in case git push wasn´t enough, followed by create but problem persisted.

This is the error log:

2017-04-01T12:32:10.000000+00:00 app[api]: Build succeeded
2017-04-01T12:32:26.119502+00:00 heroku[web.1]: Starting process with    command `npm start`
2017-04-01T12:32:28.800342+00:00 app[web.1]: npm ERR! argv   "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-04-01T12:32:28.799596+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-  generic
2017-04-01T12:32:28.803905+00:00 app[web.1]:
2017-04-01T12:32:28.800757+00:00 app[web.1]: npm ERR! node v6.10.1
2017-04-01T12:32:28.805587+00:00 app[web.1]: npm ERR!
2017-04-01T12:32:28.801137+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-04-01T12:32:28.805753+00:00 app[web.1]: npm ERR! If you need help,  you may report this error at:
2017-04-01T12:32:28.805256+00:00 app[web.1]: npm ERR! missing script: start
2017-04-01T12:32:28.805908+00:00 app[web.1]: npm ERR!         <https://github.com/npm/npm/issues>
2017-04-01T12:32:28.819004+00:00 app[web.1]:
2017-04-01T12:32:28.820190+00:00 app[web.1]: npm ERR! Please include the  following file with any support request:
2017-04-01T12:32:28.820468+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-04-01T12:32:28.881840+00:00 heroku[web.1]: State changed from starting to crashed
2017-04-01T12:32:28.882904+00:00 heroku[web.1]: State changed from crashed to starting
2017-04-01T12:32:28.866923+00:00 heroku[web.1]: Process exited with status 1
2017-04-01T12:32:30.162305+00:00 heroku[web.1]: Starting process with command `npm start`
2017-04-01T12:32:32.696793+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-generic
2017-04-01T12:32:32.697154+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-04-01T12:32:32.697362+00:00 app[web.1]: npm ERR! node v6.10.1
2017-04-01T12:32:32.697582+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-04-01T12:32:32.699326+00:00 app[web.1]:
2017-04-01T12:32:32.700267+00:00 app[web.1]: npm ERR! missing script: start
2017-04-01T12:32:32.700411+00:00 app[web.1]: npm ERR!
2017-04-01T12:32:32.700481+00:00 app[web.1]: npm ERR! If you need help, you may report this error at:
2017-04-01T12:32:32.700576+00:00 app[web.1]: npm ERR!     <https://github.com/npm/npm/issues>
2017-04-01T12:32:32.709799+00:00 app[web.1]:
2017-04-01T12:32:32.710077+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-04-01T12:32:32.710137+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-04-01T12:32:32.792370+00:00 heroku[web.1]: Process exited with status 1
2017-04-01T12:32:32.811121+00:00 heroku[web.1]: State changed from starting to crashed
2017-04-01T12:32:33.779902+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=apple-cake-55213.herokuapp.com   request_id=34c1dba4-31bc-4a6a-b421-de45d1660031 fwd="own IP removed" dyno= connect= service= status=503 bytes= protocol=https
2017-04-01T12:32:33.904512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=apple-cake- 55213.herokuapp.com request_id=8e9cf2d9-2109-49e3-826b-84139a0764e8 fwd="own  IP removed" dyno= connect= service= status=503 bytes= protocol=https

Any ideas?

Thanks!

zulqarnain nazir

i have same problem and think its problem of you package.json file i have add these lines in your package.json file it fix for me

"scripts": {
    "start": "node your-script.js"
 }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Npm ERR! Missing Script: Start when deploying to heroku

From Dev

Procfile in Heroku

From Dev

Procfile Heroku

From Dev

Heroku version not set despite following guide

From Dev

Heroku Procfile not working

From Dev

heroku $PORT variable in Procfile

From Dev

Heroku, Procfile and gitignore

From Dev

Django-twoscoops-project (skeleton) on Heroku via Gunicorn. How to set Procfile?

From Dev

How to create a Procfile for Python in Heroku?

From Dev

Heroku Flask Tutorial Procfile Meaning

From Dev

Heroku looking for Procfile in wrong directory

From Dev

ruby and heroku procfile for web app

From Dev

Difference between Procfile and Procfile.Windows in heroku servers

From Dev

How to set up collectfast for django on heroku?

From Dev

Set up a .app custom domain on a heroku app

From Dev

Set up nodemailer before deployment with heroku

From Dev

Heroku Procfile won't run Django app

From Dev

"No Procfile detected" in Sinatra app heroku push

From Dev

Rails app using Thin and SSL on Heroku (Procfile)

From Dev

"No Procfile detected" in Sinatra app heroku push

From Dev

Heroku No such process type web defined in procfile

From Dev

Heroku: No such process type worker defined in Procfile

From Dev

Procfile not found when deploying app to heroku

From Dev

Heroku builds with a older version of package.json

From Dev

Setting up a task in package.json

From Dev

How to set up RefineryCMS with Heroku and Amazon AWS assets

From Dev

How do I: set up sass with Python/Flask on heroku?

From Dev

Do I need a Procfile to push a Sinatra app to Heroku?

From Dev

Heroku. New Relic Procfile command doesn't work