JavaScript
x
6
1
npm install @material-ui/core
2
npm ERR! Unexpected end of JSON input while parsing near '...X1F+dSMvv9bUwJSg+lOUX'
3
4
npm ERR! A complete log of this run can be found in:
5
npm ERR! C:UsersWR-022AppDataRoamingnpm-cache_logs2020-03-19T15_48_14_800Z-debug.log
6
debug.log
JavaScript
1
29
29
1
0 info it worked if it ends with ok
2
1 verbose cli [
3
1 verbose cli 'C:\Program Files\nodejs\node.exe',
4
1 verbose cli 'C:\Users\WR-022\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
5
1 verbose cli 'install',
6
1 verbose cli '@material-ui/core'
7
1 verbose cli ]
8
2 info using npm@6.13.4
9
3 info using node@v12.13.1
10
4 verbose npm-session c306ec592b524249
11
5 silly install loadCurrentTree
12
6 silly install readLocalPackageData
13
7 http fetch GET 304 https://registry.npmjs.org/@material-ui%2fcore 1376ms (from cache)
14
8 silly fetchPackageMetaData error for @material-ui/core@latest Unexpected end of JSON input while parsing near '...X1F+dSMvv9bUwJSg+lOUX'
15
9 timing stage:rollbackFailedOptional Completed in 1ms
16
10 timing stage:runTopLevelLifecycles Completed in 4080ms
17
11 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...X1F+dSMvv9bUwJSg+lOUX'
18
11 verbose stack at JSON.parse (<anonymous>)
19
11 verbose stack at parseJson (C:UsersWR-022AppDataRoamingnpmnode_modulesnpmnode_modulesjson-parse-better-errorsindex.js:7:17)
20
11 verbose stack at C:UsersWR-022AppDataRoamingnpmnode_modulesnpmnode_modulesnode-fetch-npmsrcbody.js:96:50
21
11 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
22
12 verbose cwd E:corporate-new-ui
23
13 verbose Windows_NT 10.0.18362
24
14 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\WR-022\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "@material-ui/core"
25
15 verbose node v12.13.1
26
16 verbose npm v6.13.4
27
17 error Unexpected end of JSON input while parsing near '...X1F+dSMvv9bUwJSg+lOUX'
28
18 verbose exit [ 1, true ]
29
Advertisement
Answer
use :
JavaScript
1
2
1
npm cache clean --force
2
See this https://github.com/npm/npm/issues/19072#issuecomment-345555468 I hope that solve your issue.