Reputation: 178
For those familiar with the react-on-rails gem, or more generally, yarn:
Just today I updated my Node version to 8.8.1 via Homebrew. Now, when I attempt to run bundle && yarn && foreman start -f Procfile.dev
(or just yarn install), I get the following message:
error [email protected]: The engine "node" is incompatible with this module. Expected version "5.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
This is likely a very simple issue I am running into, but I have been unable to fix it after a few hours of debugging.
I tried manually updating my Node version in package.json to be that on my computer (did not seem to take effect whatsoever), downgrading my version to 5.10.0 via Homebrew (but was unable to), and even upgrading to the latest version of the gem which meant installing webpack as well.
No matter what I did, my local server startup (bundle && yarn && foreman start -f Procfile.dev
) still lead to the same error above. Any ideas for this poor soul?
Upvotes: 2
Views: 5100
Reputation: 77
You need to update your Node.js version. Try to
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Upvotes: 1
Reputation: 178
For anyone running into this same issue, I have not found a solution for the underlying issue but I have found a temporary workaround.
Simply run
bundle && yarn --ignore-engines && foreman start -f Procfile.dev
instead of
bundle && yarn && foreman start -f Procfile.dev
I hope this helps someone else that may have found themselves stuck in the same situation!
Upvotes: 3
Reputation: 5942
I give you this list of checks to do from the react-webpack-rails-tutorial
github page
Basic Demo Setup
Be sure that you have Node installed! We suggest nvm, with node version v6.0 or above. See this article Updating and using nvm.
git clone [email protected]:shakacode/react-webpack-rails-tutorial.git cd react-webpack-rails-tutorial
- Check that you have Ruby 2.3.0 or greater
- Check that you're using the right version of node. Run nvm list to check. Use 5.5 or greater.
- Check that you have Postgres installed. Run which postgres to check. Use 9.4 or greater.
- Check that you have qmake installed. Run which qmake to check. If missing, follow these instructions: Installing Qt and compiling capybara-webkit
- Check that you have Redis installed. Run which redis-server to check. If missing, install with Homebrew (brew install redis) or follow these instructions.
- bundle install
- brew install yarn
- yarn
- rake db:setup
- foreman start -f Procfile.hot
- Open a browser tab to http://localhost:3000 for the Rails app example with HOT RELOADING
- Try Hot Reloading steps below!
- foreman start -f Procfile.static
- Open a browser tab to http://localhost:3000 for the Rails app example.
- When you make changes, you have to refresh the browser page.
Upvotes: 0