cli
cli copied to clipboard
fix: Add better error message when lockfile is malformed
Sometimes when I am working with a monorepo of many workspaces with intermittencies I encounter the following error:
npm ERR! Cannot read properties of undefined (reading 'extraneous')
Which isn't very actionable. It also isn't very actionable with I add the --verbose
option. All that does is point to @npmcli/arborist/lib/arborist/load-virtual.js:297:30
.
Having added some logging manually I have been always able to fix up the lock file merely but removing the offending entry and then running npm install
again.