I'm using @nx/webpack:webpack builder with generatePackageJson set to true. Build is generating package.json -file and pnpm-lock.yml -file. When running pnpm install with generated files. I'm getting following error:
WARN Broken lockfile: no entry for '/ansi-regex/5.0.1' in pnpm-lock.yaml
ERR_PNPM_ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY The lockfile is broken! Resolution step will be performed to fix it.
WARN Could not find preferred package /ansi-regex/5.0.1 in lockfile
Expected Behavior
Generated lock-file should work without additional fixing.
GitHub Repo
No response
Steps to Reproduce
Unzip files and run pnpm install
There is also fixed version and original workspace pnpm-lock.yamlArchive.zip
Nx Report
NX Report complete - copy this into the issue template
Node : 20.2.0
OS : darwin-arm64
pnpm : 8.5.1
nx : 17.0.3
@nx/js : 17.0.3
@nx/jest : 17.0.3
@nx/linter : 17.0.3
@nx/eslint : 17.0.3
@nx/workspace : 17.0.3
@nx/cypress : 17.0.3
@nx/devkit : 17.0.3
@nrwl/devkit : 15.8.5
@nx/esbuild : 17.0.3
@nx/eslint-plugin : 17.0.3
@nx/next : 17.0.3
@nx/node : 17.0.3
@nx/playwright : 17.0.3
@nx/plugin : 17.0.3
@nx/react : 17.0.3
@nx/rollup : 17.0.3
@nx/storybook : 17.0.3
@nrwl/tao : 17.0.3
@nx/vite : 17.0.3
@nx/web : 17.0.3
@nx/webpack : 17.0.3
typescript : 5.1.3
---------------------------------------
Community plugins:
@enio.ai/typedoc : 1.0.8
---------------------------------------
Local workspace plugins:
@livekatsomo/typedoc
---------------------------------------
The following packages should match the installed version of nx
- @nrwl/devkit@15.8.5
To fix this, run `nx migrate nx@17.0.3`
I experience the same issue and also with ansi-regex. "Solved" by removing one of the packages that depends on ansi-regex ( @inquirer ) from the root package.json devDependencies. Ping me if you need additional info like pnpm-lock.yaml before/after.
Current Behavior
I'm using
@nx/webpack:webpack
builder withgeneratePackageJson
set to true. Build is generatingpackage.json
-file andpnpm-lock.yml
-file. When runningpnpm install
with generated files. I'm getting following error:Expected Behavior
Generated lock-file should work without additional fixing.
GitHub Repo
No response
Steps to Reproduce
pnpm install
There is also fixed version and original workspacepnpm-lock.yaml
Archive.zipNx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response