1

Based on this question, when I try to run the suggested answer (heroku run npm run "script name") I get "bash: npm: command not found". I'm trying to trigger the script on a deployed meteor NodeJS app to Heroku (node version 4.8.2 and npm version 4.6.1). Any solutions to why?

package.json

{  
  "name": "admini_meteor",  
  "private": true,  
  "scripts": {
    "deploy": "MONGO_URL=mongodb://52.1.130.211/cloud meteor"
  },
  "dependencies": {
    "babel-runtime": "^6.23.0",
    "bcrypt": "^1.0.2"
  }
}

Procfile web: npm run deploy

qballmath
  • 11
  • 1
  • 5

2 Answers2

3

You need to add nodejs in your buildpack enter image description here

And then deploy your app again! That's all!

Javier Alejandro
  • 196
  • 2
  • 11
1

I am no expert but I will try to give you a hint of your problem because I had the same one. Everything is in the docs you just need to read it. So far the web process in the one taking care of running the actual app/server like here. But also how is your project structure? Heroku detects you are developing a node project (because of package.json file in root directory) so it should install npm for you.

In my case I was developing a Laravel app, therefore, it created a PHP application without node and npm. There is a way to tell heroku you need both environments like state here