bin/run_webpack: line 15: npm: command not found while pushing to heroku
See original GitHub issueI follow all the README Steps for running it local. running locally fine (migration/run-server) Then
heroku create appname
git add -a
git commit -m 'intial commit'
git push heroku master
has below error;
Counting objects: 87, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (87/87), 22.28 KiB | 0 bytes/s, done.
Total 87 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Python,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Python app detected
remote: -----> Running pre-compile hook
remote: ----->Pre-compile hook
remote: -----> Running Webpack
remote: jquery-webpack-stats.json created
remote: webpack-stats.json created
remote: bin/run_webpack: line 15: npm: command not found
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to meddy.
remote:
To https://git.heroku.com/meddy.git
! [remote rejected] master -> master (pre-receive hook declined)
and the app.json file is ;
{
"name": "appname",
"description": "Meddy Heroku app.",
"scripts": {
"postdeploy": "python manage.py migrate"
},
"env": {
"ALLOWED_HOSTS": {
"description": "Django ALLOWED_HOSTS setting, e.g.: .appname.herokuapp.com"
},
"DISABLE_COLLECTSTATIC": {
"description": "Heroku setting to disable Django collectstatic (it is run by bin/post_compile)",
"value": "1"
},
"DJANGO_SETTINGS_MODULE": {
"description": "Django settings Python import path",
"value": "appname.settings.production"
},
"SECRET_KEY": {
"description": "Django SECRET_KEY setting",
"generator": "secret"
}
},
"formation": {
"web": {
"quantity": 1,
"size": "free"
},
"worker": {
"quantity": 1,
"size": "free"
}
},
"addons": [
{
"plan": "heroku-postgresql:hobby-dev",
"options": {
"version": "9.5"
},
"as": "DATABASE"
},
{
"plan": "heroku-redis:hobby-dev",
"options": {
"version": "3.2"
},
"as": "REDIS"
},
{
"plan": "sendgrid:starter"
},
{
"plan": "papertrail:choklad"
},
{
"plan": "opbeat:test"
}
],
"buildpacks": [
{
"url": "heroku/nodejs"
},
{
"url": "heroku/python"
}
]
}
PS : I don’t want to host repo on git and deploy via Button.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:15 (9 by maintainers)
Top Results From Across the Web
"npm: command not found" error when deploying Python ...
Heroku only runs one buildpack by default and it doesn't know whether it should use its Python buildpack or its Node.js buildpack for...
Read more >Troubleshooting Node.js Deploys - Heroku Dev Center
Your Node.js deploy failed - now what? Start with these simple steps to troubleshoot a build issue. Check the buildpack.
Read more >Why does node, npm, and yarn return 'command not found ...
If the :$PATH is missing from any assignment to PATH , the binaries from the Heroku build (including node, yarn and npm) will...
Read more >Heroku Node.js Support
Runtime behavior. The buildpack puts node , npm , and node_modules/.bin on the PATH so they can be executed ...
Read more >Getting Started with Lightning Web Components Open Source ...
json file auto-generates when you run npm install . When you deploy an app, Heroku reads the package.json to install the appropriate Node ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Works By; removing pkg-resources==0.0.0 from req.txt file Changing bootstrap: version from “^4.0.0-alpha.4” to “4.0.0-alpha.4” in package.json
Super Thanks @andersonresende @aericson
@taqiofficial Put the buildpacks back: first node, second python. Remove functools32 from requirements.txt. And change your bootstrap version on package.json: remove the
^
.