-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precompiling assets on Heroku fails with /bin/sh: 1: npm: not found
#2254
Comments
I think the problem is this line, what is in that script? Is npm installed on the remote? |
Hey there, I would suggest one of two things here:
|
Perhaps let me cross link this with another ticket so the maintainer on the heroku buildpack can get involved. Here is the heroku ruby build pack which should work without having to install the nodejs buildpack (it has yarn and npm support for sprockets and other versions of rails.) heroku/heroku-buildpack-ruby#912 My hunch was that the latest webpacker system started to rely on I originally thought it might be something to do with the node upgrade b4057d7 and the way heroku's build pack detects what to do with a rails project. If I have a bit more time in a week or so I will see if I can debug a bit more and help out |
Timothy, Do you mind providing us with the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This error can occur if you update the
|
This comment has been minimized.
This comment has been minimized.
/bin/sh: 1: npm: not found
To everyone in this thread: If your issue is not related to
I am going to hide the errors that don't seem related to this issue. You may also find some heroku-specific solutions in: #395 |
@matthewgoodwin You have several warnings, but this 👆 is probably the source of your problems. If you open a new issue, I can advise further. |
Am having this issue deploying rails 6 on heroku , Any solution? Have tried defining engines in |
@ahowardm Following your guide i was able to get it. But also had to disable rails default yarn install , since it was installing node packages and gems twice. see code
More https://dev.to/vvo/a-rails-6-setup-guide-for-2019-and-2020-hf5 |
Summary
When using the latest heroku ruby build pack (https://github.com/heroku/heroku-buildpack-ruby) and deploying a standard rails 5.2+ application the asset compilation yields a broken compilation every time.
Expected Behavior
When you deploy to heroku assets compile with the standard ruby buildpack
Actual behavior
webpacker or related system seems to call out to NPM incorrectly and assets are not able to be compiled.
Repo
Was able to repro by simply deploying a standard empty application with the 4.0.7 release and then tagging master in both package.json and Gemfile. The difference causes a failure.
Output
Failure Output
Output on 4.0.7 tag
The text was updated successfully, but these errors were encountered: