$ pnpm update -i
Scope: current workspace package
ERROR Cannot read property 'optionalDependencies' of undefined
at 0/lib/node_modules/pnpm/… pnpm/outdated/lib/outdated.js:24
at map
at outdated [as default] ../../../../../../../nvm/versions/node/v13.5.0/lib/node_modules/pnpm/lib/node_modules/@pnpm/outdated/lib/outdated.js:21 await Promise.all(types_…
at 0/lib/node_modules/pnpm/… pnpm/outdated/lib/outdatedDepsOfProjects.js:33
at map
at outdatedDepsOfProjects ../../../../../../../nvm/versions/node/v13.5.0/lib/node_modules/pnpm/lib/node_modules/@pnpm/outdated/lib/outdatedDepsOfProjects.js:31 return Promise.all(pkgs.…
at async interactiveUpdate ../../../../../../../nvm/versions/node/v13.5.0/lib/node_modules/pnpm/lib/node_modules/@pnpm/plugin-commands-installation/lib/update/index.js:153 const outdatedPkgsOfProj…
pnpm version: 4.9.0
Additional information:
node -v prints: 13.5.0
- Windows, OS X, or Linux?: macOS
I’m running into the same problem after renaming a subdirectory in the workspace.
Environment
Steps to Reproduce
Create these files:
/pnpm-workspace.yaml: empty file/package.json/a/package.jsonExecute
pnpm install. This would generate apnpm-lock.yamlfile.Rename
/adirectory to/bdirectory.Execute
pnpm m outdated.Error Message
Workspace Archive
This is an archive of the folder at the end of step 3: pnpm2313.tar.gz
Known Workaround
Delete
pnpm-lock.yamlfile and runpnpm installagain.This is now also happening with
pnpm outdated -ron some but not all repos.pnpm version 9.6.0