django-react-boilerplate: bin/run_webpack: line 15: npm: command not found while pushing to heroku
I 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.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15 (9 by maintainers)
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
^
.@andersonresende successfully deployed. But App crashed error on heroku open.
Looks like this could be the order of the build packs. Could you try going g on the settings of the app on heroku and adding the build packs:
In that order.