Skip to content
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

error @rails/[email protected]: The engine "node" is incompatible with this module. Expected version ">=8.16.0". Got "8.10.0" #2424

Closed
mayordwells opened this issue Jan 3, 2020 · 11 comments

Comments

@mayordwells
Copy link

Why do we randomly get this during deployment?
Sometimes it appears, sometimes it doesn't.

And every time it appears, it breaks the deployment flow by returning a non zero error. How can we make this go away?

yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: Invalid bin entry for "sha.js" (in "sha.js").
error @rails/[email protected]: The engine "node" is incompatible with this module. Expected version ">=8.16.0". Got "8.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@rossta
Copy link
Member

rossta commented Jan 6, 2020

In @rails/[email protected] the required minimum node version is specified in package.json as ">= 8.16.0":

"node": ">=8.16.0",

I'm assuming from your error message that your deployment target environment loads node 8.10.0. This does not meet the constraint. Try installing 8.16.0 or higher. I'd actually recommend shooting for an active or current LTS version if possible: https://nodejs.org/en/about/releases/

@mayordwells
Copy link
Author

Hi, @rossta thanks for your response.
I use docker and my deployment target environment uses node 13.x.x -
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash

That's why I'm confused by this error.

@rossta
Copy link
Member

rossta commented Jan 6, 2020

@mayordwells Try some debugging to challenge the assumption that your expected node version successfully installs and gets loaded in the shell. The behavior of your yarn install command suggests that it is not.

@mayordwells
Copy link
Author

Okay, @rossta I'll dig deeper and update the issue if anything.
I'll close the issue for now since it seems the issue is from my side.
Thanks

@rossta
Copy link
Member

rossta commented Jan 6, 2020

@mayordwells Ok, great. Please share if you learn anything new.

@zakariaf
Copy link

zakariaf commented Jan 25, 2020

@mayordwells I have exactly the same problem, did you find anything?

@Meekohi
Copy link

Meekohi commented Jan 26, 2020

Having the same issue, but I'm on node 10.16.0?
Stderr: warning [email protected]: Invalid bin entry for "sha.js" (in "sha.js").

@mayordwells
Copy link
Author

@mayordwells I have exactly the same problem, did you find anything?

No, @zakariaf I was not able to fix it. Usually, I would reset our docker to factory settings and just rebuild the image, that has been the only possible fix for me. The error is quite random which makes it very hard to debug.

@mayordwells
Copy link
Author

Having the same issue, but I'm on node 10.16.0?
Stderr: warning [email protected]: Invalid bin entry for "sha.js" (in "sha.js").

@Meekohi I also run on the latest version of node - 13.x.x but I still get this error randomly. I believe this is a result of one of the dependencies of webpacker trying to override the node in our current environment.

@jakeNiemiec
Copy link
Member

jakeNiemiec commented Jan 28, 2020

fix: yarn warning for invalid bin entry browserify/sha.js#65

@development-amold
Copy link

development-amold commented Dec 5, 2021

Quick Fix:
Root Cause: As far as I understood, during the deployment process, it's looking the Node version in this directory /bin/node and it ignores the NVM node version from this directory ~/.nvm/ as well as engine version written in package.json file.

Solution: Need to upgrade version located in bin directory
sudo npm cache clean -f // Clean cache
sudo npm install -g n // install npm globally
sudo n stable //install latest node stable version which should be >=8.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants