Question
How to install Node modules on app platform in Rails app
Hello. I’m evaluating the app platform to see if we can migrate our Ruby on Rails app to here from Heroku. I tried adding npm install
as a build command, and I can see it output in the logs while building the app, but it doesn’t appear to be succeeding as we’re getting an error while precompiling assets. The missing asset is one that gets installed via npm. So, my question is: what is the “correct way” to do an npm install before a Rails app precompiles assets? Do I need to add commands to install nodejs and npm (I’ve tried this to no avail)? Thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×