cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: Add better error message when lockfile is malformed

Open Nokel81 opened this issue 7 months ago • 16 comments

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.

Nokel81 avatar Nov 15 '23 13:11 Nokel81