I'm trying to deploy a rails 5.1 & react app created with webpacker gem using AWS Elastic Beanstalk. The problem is I keep getting the following error:
Webpacker requires Node.js >= 6.0.0 and you are using 4.6.0
I'm using Node 9.5.0 on my computer. Any suggestions??
To install nodejs using yum (assuming you're using the default Amazon Linux)
https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora
Now to execute this on your instances, you need to add the required commands to a config file inside the
.ebextensions
dir, something like:.ebextensions/01_install_dependencies.config
File contents:
For those of you who found this issue when upgrading to Rails 6, I wrote a post on how to fix it.
Basically, you have to:
What that amounts to is:
For those that run into needing to also install Yarn, I have found the below just worked for me: