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

fails on build startup in codesanbox.io #90

Open
danindiana opened this issue Nov 12, 2023 · 0 comments
Open

fails on build startup in codesanbox.io #90

danindiana opened this issue Nov 12, 2023 · 0 comments

Comments

@danindiana
Copy link

error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "12.13.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The error message you're encountering indicates a compatibility issue between the javascript-obfuscator module you're trying to use and your current Node.js version. The module requires a Node.js version of either "^12.22.0", "^14.17.0", or ">=16.0.0", but you have "12.13.1" installed.

Here's how you can resolve this:

Upgrade Node.js
You need to upgrade your Node.js to a compatible version. The easiest way to manage Node.js versions is by using nvm (Node Version Manager).

Install nvm (if you haven't already):

bash
Copy code
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

or

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
After installing, you may need to restart your terminal or source your profile (source ~/.bashrc or source ~/.zshrc, depending on your shell).

Install a compatible Node.js version:

bash
Copy code
nvm install 14.17.0 # for version 14.17.0

or

nvm install 16 # for the latest in the 16.x line
Choose the version that best suits your project requirements.

Switch to the installed Node.js version:

bash
Copy code
nvm use 14.17.0

or

nvm use 16
Verify the Node.js version:

bash
Copy code
node --version
Reinstall Dependencies
After upgrading Node.js, navigate to your project directory and reinstall your dependencies:

bash
Copy code
yarn install
This should resolve the compatibility issue, and yarn install should complete without the error you were encountering. If your project has specific version requirements, make sure the Node.js version you choose aligns with those requirements.

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

1 participant