Closed doregg closed 10 months ago
Same problem happened after trying to do a clean install (no node-modules and yarn.lock). Keeping the yarn.lock version outdated kept things working.
Node version 14.21 yarn 1.22.19
Same problem happened to me as well, i did a clean docker-image with node:16-alpine and only works with v7+ lerna
/ # yarn add global lerna@6.6.2
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning lerna > libnpmaccess > npm-registry-fetch > make-fetch-happen > cacache > @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
[2/4] Fetching packages...
error @yarnpkg/parsers@3.0.0-rc.49: The engine "node" is incompatible with this module. Expected version ">=18.12.0". Got "16.20.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
/ # node -v
v16.20.0
Until this gets fixed, maybe add the following to your package.json file:
"resolutions": {
"@yarnpkg/parsers": "3.0.0-rc.48.1"
}
Until this gets fixed, maybe add the following to your package.json file:
"resolutions": { "@yarnpkg/parsers": "3.0.0-rc.48.1" }
niu bi
"resolutions": { "@yarnpkg/parsers": "3.0.0-rc.48.1" }
After adding this, it's still breaking, it can't see the resolution i've put in my package.json file? Any help on how to force it?
error @yarnpkg/parsers@3.0.0-rc.49: The engine "node" is incompatible with this module. Expected version ">=18.12.0". Got "14.21.3" error Found incompatible module.
@doregg You able to figure this out?
@divyesh-puri, For now, our workaround is not to use yarn global add
.
We're waiting for the yarn team/contributors reference
One of your dependencies depends on a version of @yarnpkg/parsers
that doesn't support the version of Node.js you're using.
You can either upgrade your version of Node.js, use resolutions to force Yarn to install a version that does support your Node.js version, or report the issue to the relevant dependency.
Closing as this isn't a Yarn issue.
"resolutions": { "@yarnpkg/parsers": "3.0.0-rc.48.1" }
After adding this, it's still breaking, it can't see the resolution i've put in my package.json file? Any help on how to force it?
error @yarnpkg/parsers@3.0.0-rc.49: The engine "node" is incompatible with this module. Expected version ">=18.12.0". Got "14.21.3" error Found incompatible module.
Just paste the following in the yarn global package.json. Mine is /usr/local/share/.config/yarn/global/package.json
. Pls run yarn global dir
to check yours.
{
"resolutions": {
"@yarnpkg/parsers": "3.0.0-rc.48.1"
}
}
last months I have seen many packages providers/vendors are not using semantic versioning the right way, this is braking change
Thanks @zhfkt, that did the trick!!! I was adding it into my local package.json rather than my global package.json
Thanks for your help
you can try running yarn install --ignore-engines
What worked for me is
resolutions
to package.json
{
"resolutions": {
"@yarnpkg/parsers": "3.0.0-rc.48.1"
}
}
yarn global add json lerna@6.6.2
on dockerfile I changed it to yarn global add json lerna@6.6.2 @yarnpkg/parsers@3.0.0-rc.48.1 --ignore-engines
These changes worked for me
Upgrade node to node lts will fix the issue
Describe the bug
Start getting an error:
when running
yarn global add lerna@^5.5.0
. I realized that you pushed3.0.0-rc.49
2 hours ago. It worked before.To reproduce
Environment