Conversation
While the workaround is to simply add a name to the package, the name field is defined as optional and NPM otherwise only warns about it's lack of existence. I tripped across this myself and found I wasn't the first one: https://stackoverflow.com/questions/59777226/npm-ci-throws-exception-cannot-read-property-length-of-undefined
|
I’ve run into this issue as well. If you have Now to the interesting part. What should So I wonder what the ultimate fix needs to be ... making |
|
While I agree that the larger picture needs to be looked at and possibly cleaned, this was an attempt to make the smallest fix that solves the bug. Thus making it easy to review and merge. Re-evaluating and rebuilding whole logic blocks in open source projects, as much as that's tempting, is something I've not had time for since I started coding full time several years ago. Sadness. |
|
Hi there! Actually i came here while investigating an issue that was misleading about source of error (nuxt-contrib/opencollective#61). Meanwhile it absolutely makes sense that consumer of |
Not every
package.jsonhas a name: while npm warns if a name is not provided, it is not required. In my case I have one that should NOT have a name as it's being used only for dependency management, not package description. I know, it's an edge case.The workaround is to simply add a name to the package.
I tripped across this myself and found I wasn't the first one: https://stackoverflow.com/questions/59777226/npm-ci-throws-exception-cannot-read-property-length-of-undefined