Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! Cannot read property '0' of undefined #34

Closed
CarpenterBug opened this issue Jul 28, 2017 · 7 comments
Closed

npm ERR! Cannot read property '0' of undefined #34

CarpenterBug opened this issue Jul 28, 2017 · 7 comments

Comments

@CarpenterBug
Copy link

Hello github'ers,

When I try to install this plugin by running npm install webpack-livereload-plugin --save-dev, I get this warning and error:

npm WARN ajv-keywords@1.5.1 requires a peer of ajv@>=4.10.0 but none was installed.
npm ERR! Cannot read property '0' of undefined

Do you have any idea why? Here're all packages that I'm using:

"auto-prefixer": "^0.4.2",
"autoprefixer": "^7.1.2",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^0.28.4",
"eslint": "^4.3.0",
"eslint-config-google": "^0.9.1",
"eslint-loader": "^1.9.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"html-webpack-plugin": "^2.29.0",
"modernizr": "^3.5.0",
"modernizr-loader": "^1.0.1",
"node-sass": "^4.5.3",
"postcss-loader": "^2.0.6",
"rimraf": "^2.6.1",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"webpack": "^3.4.0",
"webpack-svgstore-plugin": "^4.0.1"

Thank you in advance

@statianzo
Copy link
Owner

An npm-debug.log file should've been created after the error. Can you post that?

@CarpenterBug
Copy link
Author

CarpenterBug commented Jul 28, 2017

Sure, you can find it here npm-debug-log.txt (too long to post it directly here)

@statianzo
Copy link
Owner

Looks like the error is happening inside of npm code on this line when attempting to unbuild block-stream.
https://github.com/npm/npm/blob/release-next/lib/unbuild.js#L61

I'd suggest filing a ticket with this log to https://github.com/npm/npm

@statianzo
Copy link
Owner

Looks like there's already an issue posted for the error. Maybe just attach your log there. npm/npm#17987

@CarpenterBug
Copy link
Author

Will do Done (npm/npm#18042). Thank you @statianzo

@CarpenterBug
Copy link
Author

Based on this comment, I've found the solution to this problem.

I've deleted the node_modules folder and the package-lock.json and problem solved.

Once again, thank you for the support @statianzo

@nagaraj-a
Copy link

rimraf node_modules and npm install solved the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants