Closed pvorona closed 2 months ago
I'm also hitting this. Downgrading to 3.7.0 also isn't working
Have the same issue:
The generated lock file contains empty descriptor ""
:
"":
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
dependencies:
is-core-module: "npm:^2.13.0"
path-parse: "npm:^1.0.7"
supports-preserve-symlinks-flag: "npm:^1.0.0"
bin:
resolve: bin/resolve
checksum: 5479b7d431cacd5185f8db64bfcb7286ae5e31eb299f4c4f404ad8aa6098b77599563ac4257cb2c37a42f59dfc06a1bec2bcf283bb448f319e37f0feb9a09847
languageName: node
linkType: hard
Where entry in original lockfile is:
"resolve@patch:resolve@npm%3A1.22.8#~builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.1.7#~builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.12.0#~builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.14.2#~builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.20.0#~builtin<compat/resolve>":
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
dependencies:
is-core-module: "npm:^2.13.0"
path-parse: "npm:^1.0.7"
supports-preserve-symlinks-flag: "npm:^1.0.0"
bin:
resolve: bin/resolve
checksum: 5479b7d431cacd5185f8db64bfcb7286ae5e31eb299f4c4f404ad8aa6098b77599563ac4257cb2c37a42f59dfc06a1bec2bcf283bb448f319e37f0feb9a09847
languageName: node
linkType: hard
The same with yarn@3
Also a duplicate https://github.com/nrwl/nx/issues/19881
Is there any update on this or workarounds?
I'll close this as it looks like an exact duplicate of https://github.com/nrwl/nx/issues/19881 Let's continue the discussion there.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Invalid lock file is generated when optional peer dependency is available at the root level when using yarn 4.
Expected Behavior
Valid
yarn.lock
is generated.GitHub Repo
https://github.com/pvorona/nx-invalid-lockfile
Steps to Reproduce
yarn 4
package manager and add the following dependencies to the rootpackage.json
:app
) inside the workspace with only one dependencylangchain
app
with"generatePackageJson": true
yarn
command in the compiled project:Internal Error: Invalid descriptor () at nh (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:140:109585) at St.setupResolutions (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:210:1274) at async St.find (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:207:9452) at async bh.execute (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:392:11773) at async bh.validateAndExecute (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:94:787) at async as.run (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:98:3250) at async oPt (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:734:11269) at async sk (/Users/pavelvorona/.cache/node/corepack/yarn/4.0.2/yarn.js:734:11625)
Failure Logs
No response
Package Manager Version
4.0.2
Operating System
Additional Information
No response