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

Troubles to upgrade to the latest version of Webpack #8453

Closed
kud opened this Issue Dec 3, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@kud

kud commented Dec 3, 2018

Hello,

For the moment, I can't upgrade to the latest version of Webpack.

This is what I've got:

$ npm install --save-dev webpack
npm ERR! Unexpected end of JSON input while parsing near '...r\nComment: https://o'

And the log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/11.3.0_1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '--save-dev',
1 verbose cli   'webpack' ]
2 info using npm@6.4.1
3 info using node@v11.3.0
4 verbose npm-session 0ebf8ebd5e3254ad
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/webpack 12ms (from cache)
8 silly fetchPackageMetaData error for webpack@4.20.2 Unexpected end of JSON input while parsing near '...r\nComment: https://o'
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 1666ms
11 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...r\nComment: https://o'
11 verbose stack     at JSON.parse (<anonymous>)
11 verbose stack     at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
11 verbose stack     at consumeBody.call.then.buffer (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50)
11 verbose stack     at process.internalTickCallback (internal/process/next_tick.js:77:7)
12 verbose cwd /Users/kud/Projects/_contexte/lois-webapp
13 verbose Darwin 18.2.0
14 verbose argv "/usr/local/Cellar/node/11.3.0_1/bin/node" "/usr/local/bin/npm" "install" "--save-dev" "webpack"
15 verbose node v11.3.0
16 verbose npm  v6.4.1
17 error Unexpected end of JSON input while parsing near '...r\nComment: https://o'
18 verbose exit [ 1, true ]

I've tried to rm -rf node_modules and re-install but nothing happens better. And I have this problem only with webpack, other packages are ok.

@evilebottnawi

This comment has been minimized.

Member

evilebottnawi commented Dec 3, 2018

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.

@kud

This comment has been minimized.

kud commented Dec 3, 2018

I was doing the same issue with the issue template but finally I found the solution:

npm cache clean --force

Thank you @evilebottnawi and sorry, the next time I'll use the template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment