React_on_rails: The engine "node" is incompatible with this module

Created on 30 Oct 2017  路  6Comments  路  Source: shakacode/react_on_rails

Hi all,

Thanks for the great Gem. Have absolutely loved using this with my Rails app!

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?

discussion

Most helpful comment

Hey all,

For anyone encountering this same issue, a temporary workaround is changing the local server start command to bundle && yarn --ignore-engines && foreman start -f Procfile.dev

If anyone has ideas about how to resolve the underlying issue, please share!

All 6 comments

@CodyFitzpatrick Try deleting or updating the lines that say "engine" in your package.json files.

Hey Justin, really appreciate the suggestion.

Unfortunately that did not seem to have an effect, for better or for worse.

After seeing the below error I completely uninstalled and re-installed yarn as I thought it could be an issue with yarn, but still the same error unfortunately. Is this an issue with my config files for React on Rails or perhaps something at a lower level?

MacBook-Pro:Project-Name codyfitzpatrick$ yarn install --verbose
yarn install v1.2.1
warning package.json: No license field
verbose 0.447 Checking for configuration file "/Users/codyfitzpatrick/Documents/GitHub/Project-Name/.npmrc".
verbose 0.448 Checking for configuration file "/Users/codyfitzpatrick/.npmrc".
verbose 0.448 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.448 Checking for configuration file "/Users/codyfitzpatrick/Documents/GitHub/Project-Name/.npmrc".
verbose 0.448 Checking for configuration file "/Users/codyfitzpatrick/Documents/GitHub/.npmrc".
verbose 0.449 Checking for configuration file "/Users/codyfitzpatrick/Documents/.npmrc".
verbose 0.449 Checking for configuration file "/Users/codyfitzpatrick/.npmrc".
verbose 0.449 Checking for configuration file "/Users/.npmrc".
verbose 0.45 Checking for configuration file "/Users/codyfitzpatrick/Documents/GitHub/Project-Name/.yarnrc".
verbose 0.45 Checking for configuration file "/Users/codyfitzpatrick/.yarnrc".
verbose 0.451 Found configuration file "/Users/codyfitzpatrick/.yarnrc".
verbose 0.451 Checking for configuration file "/usr/local/etc/yarnrc".
verbose 0.451 Checking for configuration file "/Users/codyfitzpatrick/Documents/GitHub/Project-Name/.yarnrc".
verbose 0.451 Checking for configuration file "/Users/codyfitzpatrick/Documents/GitHub/.yarnrc".
verbose 0.452 Checking for configuration file "/Users/codyfitzpatrick/Documents/.yarnrc".
verbose 0.452 Checking for configuration file "/Users/codyfitzpatrick/.yarnrc".
verbose 0.452 Found configuration file "/Users/codyfitzpatrick/.yarnrc".
verbose 0.452 Checking for configuration file "/Users/.yarnrc".
verbose 0.455 current time: 2017-10-30T18:08:47.414Z
warning [email protected]: No license field
[1/5] 馃攳 Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version "5.10.0".
verbose 0.487 Error: Found incompatible module
at Object.checkOne (/usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:59995:11)
at /usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:22209:75
at Generator.next ()
at step (/usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:92:30)
at /usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:110:14
at new Promise ()
at new F (/usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:29382:28)
at /usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:89:12
at steps.push (/usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:22213:26)
at /usr/local/Cellar/yarn/1.2.1/libexec/lib/cli.js:22312:34
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Hey all,

For anyone encountering this same issue, a temporary workaround is changing the local server start command to bundle && yarn --ignore-engines && foreman start -f Procfile.dev

If anyone has ideas about how to resolve the underlying issue, please share!

Thanks @CodyFitzpatrick.

Thanks @CodyFitzpatrick this worked for me.

1
down vote
You need to update your Node.js version. Try to

Clear NPM's cache:
sudo npm cache clean -f

Install a little helper called 'n'
sudo npm install -g n

Install latest stable Node.js version
sudo n stable

Was this page helpful?
0 / 5 - 0 ratings