Cannot read property '0' of undefined #17858
Comments
Happens to me too when I try to install chalk. Node version is 6.9.4, npm version is 5.3.0, log:
|
npm 5.3.0 is broken (on windows 10) for me too after upgrading to nodeJS v8.2.0. Same symptoms/logs as described above. |
@jlchereau : Thank you! |
@jlchereau i had the same error on mint and this worked |
Same problem with following configuration .
|
Same problem, but I have logs And I think I know what I did "wrong":
|
P.S. |
Same issue here, but my config: Node@7.7.4 Downgrading to NPM@5.2.0 worked perfectly for now. |
@refack, from my experience rimrafing restores |
Having the same issue with 5.3.0
|
same issue with node 8.1.1, npm 5.3.0 |
Same issue for me. Config: |
Same issue for me. I'm at npm 5.3.0, node v8.2.1. |
same for me npm 5.3.0 node v8.2.1 |
Same as the others. NPM 5.3.0 and Node v8.2.1 |
Same thing here, node@6.9.5 and NPM 5.3.0 won't work, but NPM 5.2.0 |
same, |
I think there are plenty of same here messages already. |
Same error for me. Downgrading to 5.2 solves the issue |
same error for me Downgrading npm to 5.2.0 solves the issue |
Same error for me Downgrading npm to 5.2.0 solves the issue |
same with v8.1.3 & npm@5.3.0. Same error and same error stack |
Same error for me Downgrading npm to 5.2.0 solves the issue |
Same error... Downgrading npm to 5.2.0 solves the issue |
Same error with npm 5.3.0. Downgrading to 5.2.0 fixed it. |
Same error with centos@6.5 & gcc@4.9.2 & node@8.2.1 & npm@5.3.0. Downgrading to 5.2.0 fixed it. |
@zkat, please say you'll into this... 🙏 |
Also present on:
|
Sorry no, the repo is private and already fixed by removing the node_modules folder & reinstalling. |
I was getting this after an upgrade to npm 5.5.1 but only on some projects - I realised it was those with only devDependencies. I fixed it by adding an empty |
I'm over it |
@zkat there's some repro repo's way at the top of this thread - this one should work too https://github.com/arackaf/booklist I downgraded to npm 4 to work around it, but you should be able to use it to test if you're in need of test cases. |
Same issue here with: Update!!! Run npm rebuild node-sass |
Was the same problem.
|
I confirm that npm@latest does the trick for me: |
What is the situation here? I ran into the same issue and I'm seeing that the bug is open since July. |
@dennisjac Have you tried everything above ? Like removing package-lock.json and installing all packages ? |
@dennisjac the situation is that there's been multiple fixes related to this, and most people aren't running into it anymore, but there's a couple of folks still trickling in. Sometimes you have a variety of bugs and they all manifest with the same error. The most notorious is probably |
Solved for me |
The problem is that the first time i fixed things by nuking node_modules, package-lock.json and clearing the cache but now the problem has returned and now I'm thinking about writing a script that nukes everything every time before I do an npm install just to make builds reliable again. How do I get npm version 5.6.0? I just installed node 8.9.2 but that still has 5.5.1 bundled it seems. |
@dennisjac |
Gonna close this, since it seems to be solved for people on 5.6.0 |
How do I get onto 5.6.0? I just get this error when I try to upgrade or downgrade in any way: |
Fixed with npm@5.6.0: |
Downgrading to 5.2.0 and then upgrading to 5.6.0 right after worked for me. |
since this seems to be resolved, I'm gonna lock it -- please open a new issue if you find yourself having this error again (and after making sure you've done the steps of clearing your Thanks everyone for participating! |
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
Fix: npm/npm#17858 Fix: npm/npm#18042 Fix: https://npm.community/t/issue-npm-dedupe-crash-with-typeerror-cannot-read-property-0-of-undefined/644/3 Close: #201 This fixes a bug where a package folder might have a package.json which is missing or lacks a name property. It also properly detects the scoped-ness of a package folder even if the package name is not scoped, since one might install `express@npm:@scope/express` and end up in that state.
I'm opening this issue because:
What's going wrong?
and
How can the CLI team reproduce the problem?
I do not know.
supporting information:
npm -v
prints:5.3.0
node -v
prints:v8.1.4
npm config get registry
prints:https://registry.npmjs.org/
macOS
EDIT: Seems to only happen with node 8.1.4
The text was updated successfully, but these errors were encountered: