nx: findOriginalKeys is not a function or its return value is not iterable
Current Behavior
Generating a lockfile fails
App builds correctly just the lockfile fails to generate
Expected Behavior
Should generate a lockfile correctly.
GitHub Repo
No response
Steps to Reproduce
Generate a nest app and try and use the generate package json flag to create a pruned lockfile.
Nx Report
> NX Report complete - copy this into the issue template
Node : 18.16.0
OS : darwin arm64
yarn : 1.22.17
Hasher : Native
nx : 16.1.0
@nx/js : 16.1.0
@nx/jest : 16.1.0
@nx/linter : 16.1.0
@nx/workspace : 16.1.0
@nx/angular : 16.1.0
@nx/cypress : 16.1.0
@nx/devkit : 16.1.0
@nx/eslint-plugin : 16.1.0
@nx/express : 16.1.0
@nx/nest : 16.1.0
@nx/node : 16.1.0
@nx/plugin : 16.1.0
@nx/storybook : 16.1.0
@nrwl/tao : 16.1.0
@nx/webpack : 16.1.0
nx-cloud : 16.0.5
typescript : 5.0.4
### Failure Logs
```shell
> NX An error occured while creating pruned lockfile
Please open an issue at `https://github.com/nrwl/nx/issues/new?template=1-bug.yml` and provide a reproduction.
To prevent the build from breaking we are returning the root lock file.
Original error: findOriginalKeys is not a function or its return value is not iterable
TypeError: findOriginalKeys is not a function or its return value is not iterable
at /Users/jaybell/WebstormProjects/shinkansen/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:190:41
at Array.forEach (<anonymous>)
at mapSnapshots (/Users/jaybell/WebstormProjects/shinkansen/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:189:26)
at stringifyYarnLockfile (/Users/jaybell/WebstormProjects/shinkansen/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:131:23)
at createLockFile (/Users/jaybell/WebstormProjects/shinkansen/node_modules/nx/src/plugins/js/lock-file/lock-file.js:132:60)
at /Users/jaybell/WebstormProjects/shinkansen/node_modules/@nx/webpack/src/plugins/generate-package-json-plugin.js:42:124
at fn (/Users/jaybell/WebstormProjects/shinkansen/node_modules/@nx/webpack/node_modules/webpack/lib/Compilation.js:478:10)
at _next0 (eval at create (/Users/jaybell/WebstormProjects/shinkansen/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:21:1)
at eval (eval at create (/Users/jaybell/WebstormProjects/shinkansen/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:1)
at eval (eval at create (/Users/jaybell/WebstormProjects/shinkansen/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
### Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
### Additional Information
_No response_
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (12 by maintainers)
Your new lock file on the right incorrectly maps
v7tov8.1.0. It could work, but it could also break horribly. I’m hoping to have this potentially patched today.cc @FrozenPandaz
Miro I dm’d you out lockfile. Not sure if its helpful or not.