Nx
Enterprise
Nx
fix(core): prevent undefined importer crash in pnpm lockfile parsing When stringifying a pnpm v9 lockfile with workspace packages, Nx crashes with: "Cannot destructure property 'specifiers' of 'projectSnapshot' as it is undefined." This occurs when: - The lockfile has a root importer with `link:` references to workspace packages - But the lockfile is missing the workspace package importer entries - The code tries to access `importers[importerPath]` which returns undefined - This undefined value gets added to the output lockfile - During serialization, it crashes when trying to destructure undefined Workspace packages with missing importers are now silently skipped during lockfile serialization. This prevents the crash and allows Nx to continue operating with out-of-sync lockfiles. The fix adds a null check before adding workspace dependency importers to the output lockfile. Closes NXC-3244
nx-cloud record -- nx sync:check
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx-cloud record -- nx sync:check
Click to copy
Linux
4 CPU cores
2fb8beba
33223