npm-link-bug
Minimal reproducible example for an npm bug.
The error will print this mesage in the console:
npm ERR! Cannot read property '0' of undefined
Steps to reproduce:
- Clone and install this repo.
- Clone and install the dependency of this repo.
npm link
the dependency.- Run
npm i
. This will show the error. - Run
npm ls
. This shows an unrelated error. - Delete
package-lock.json
- Run
npm ls
again to see the error we're interested in. - Note that
npm i
continues to error withpackage-lock.json
deleted.