Unable to install package - Unexpected end of JSON input
karanrajpal14 opened this issue · 1 comments
karanrajpal14 commented
Hey, I've been trying to install this on my machine like so:
➜ npm i -g ok-mdx
npm ERR! Unexpected end of JSON input while parsing near '...um":"0f1c547514263f77'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/karan/.npm/_logs/2018-08-30T02_08_36_277Z-debug.log
and I get the following error:
➜ cat /home/karan/.npm/_logs/2018-08-30T01_39_56_152Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/karan/.nvm/versions/node/v8.11.4/bin/node',
1 verbose cli '/home/karan/.nvm/versions/node/v8.11.4/bin/npm',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli 'ok-mdx' ]
2 info using npm@6.4.0
3 info using node@v8.11.4
4 verbose npm-session 7dfbbfa78ccc8af2
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/ok-mdx 1547ms (from cache)
8 silly pacote tag manifest for ok-mdx@latest fetched in 1660ms
9 timing stage:loadCurrentTree Completed in 3306ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule ok-mdx@1.0.0-7 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/ansi-html 572ms (from cache)
18 http fetch GET 304 https://registry.npmjs.org/babel-loader 631ms (from cache)
19 http fetch GET 200 https://registry.npmjs.org/babel-preset-stage-0 689ms
20 silly pacote range manifest for babel-loader@^7.1.5 fetched in 726ms
21 silly resolveWithNewModule babel-loader@7.1.5 checking installable status
22 silly pacote range manifest for babel-preset-stage-0@^6.24.1 fetched in 725ms
23 silly resolveWithNewModule babel-preset-stage-0@6.24.1 checking installable status
24 http fetch GET 200 https://registry.npmjs.org/babel-preset-env 879ms
25 http fetch GET 200 https://registry.npmjs.org/babel-core 905ms
26 silly pacote range manifest for babel-preset-env@^1.7.0 fetched in 968ms
27 silly resolveWithNewModule babel-preset-env@1.7.0 checking installable status
28 silly pacote range manifest for babel-core@^6.26.3 fetched in 972ms
29 silly resolveWithNewModule babel-core@6.26.3 checking installable status
30 http fetch GET 304 https://registry.npmjs.org/chalk 326ms (from cache)
31 silly pacote version manifest for ansi-html@0.0.7 fetched in 1145ms
32 silly resolveWithNewModule ansi-html@0.0.7 checking installable status
33 silly pacote range manifest for chalk@^2.4.1 fetched in 442ms
34 silly resolveWithNewModule chalk@2.4.1 checking installable status
35 http fetch GET 304 https://registry.npmjs.org/get-port 219ms (from cache)
36 silly pacote range manifest for get-port@^3.2.0 fetched in 262ms
37 silly resolveWithNewModule get-port@3.2.0 checking installable status
38 http fetch GET 304 https://registry.npmjs.org/html-entities 269ms (from cache)
39 silly pacote range manifest for html-entities@^1.2.1 fetched in 382ms
40 silly resolveWithNewModule html-entities@1.2.1 checking installable status
41 http fetch GET 304 https://registry.npmjs.org/connect-history-api-fallback 822ms (from cache)
42 http fetch GET 304 https://registry.npmjs.org/meow 333ms (from cache)
43 http fetch GET 200 https://registry.npmjs.org/babel-preset-react 1567ms
44 silly pacote range manifest for babel-preset-react@^6.24.1 fetched in 1682ms
45 silly resolveWithNewModule babel-preset-react@6.24.1 checking installable status
46 silly pacote range manifest for connect-history-api-fallback@^1.5.0 fetched in 1055ms
47 silly resolveWithNewModule connect-history-api-fallback@1.5.0 checking installable status
48 silly pacote range manifest for meow@^5.0.0 fetched in 564ms
49 silly resolveWithNewModule meow@5.0.0 checking installable status
50 http fetch GET 304 https://registry.npmjs.org/pkg-conf 265ms (from cache)
51 silly pacote range manifest for pkg-conf@^2.1.0 fetched in 299ms
52 silly resolveWithNewModule pkg-conf@2.1.0 checking installable status
53 http fetch GET 304 https://registry.npmjs.org/raw-loader 224ms (from cache)
54 silly pacote range manifest for raw-loader@^0.5.1 fetched in 272ms
55 silly resolveWithNewModule raw-loader@0.5.1 checking installable status
56 http fetch GET 304 https://registry.npmjs.org/brace 2150ms (from cache)
57 silly pacote range manifest for brace@^0.11.1 fetched in 2170ms
58 silly resolveWithNewModule brace@0.11.1 checking installable status
59 http fetch GET 304 https://registry.npmjs.org/koa-connect 1065ms (from cache)
60 http fetch GET 304 https://registry.npmjs.org/isocss 1102ms (from cache)
61 silly pacote range manifest for koa-connect@^2.0.1 fetched in 1142ms
62 silly resolveWithNewModule koa-connect@2.0.1 checking installable status
63 http fetch GET 304 https://registry.npmjs.org/react-dev-utils 143ms (from cache)
64 silly pacote range manifest for isocss@^1.0.0-3 fetched in 1204ms
65 silly resolveWithNewModule isocss@1.0.0-3 checking installable status
66 silly pacote range manifest for react-dev-utils@^5.0.1 fetched in 225ms
67 silly resolveWithNewModule react-dev-utils@5.0.2 checking installable status
68 http fetch GET 304 https://registry.npmjs.org/@mdx-js%2fmdx 2479ms (from cache)
69 http fetch GET 304 https://registry.npmjs.org/@mdx-js%2ftag 2518ms (from cache)
70 silly pacote range manifest for @mdx-js/mdx@^0.14.0 fetched in 2539ms
71 silly resolveWithNewModule @mdx-js/mdx@0.14.1 checking installable status
72 http fetch GET 304 https://registry.npmjs.org/react-router-dom 145ms (from cache)
73 http fetch GET 304 https://registry.npmjs.org/mini-html-webpack-plugin 1227ms (from cache)
74 silly pacote range manifest for @mdx-js/tag@^0.14.0 fetched in 2663ms
75 silly resolveWithNewModule @mdx-js/tag@0.14.1 checking installable status
76 silly pacote range manifest for react-router-dom@^4.3.1 fetched in 383ms
77 silly resolveWithNewModule react-router-dom@4.3.1 checking installable status
78 silly pacote range manifest for mini-html-webpack-plugin@^0.2.3 fetched in 1451ms
79 silly resolveWithNewModule mini-html-webpack-plugin@0.2.3 checking installable status
80 http fetch GET 304 https://registry.npmjs.org/@mdx-js%2floader 2883ms (from cache)
81 silly pacote range manifest for @mdx-js/loader@^0.14.0 fetched in 3017ms
82 silly resolveWithNewModule @mdx-js/loader@0.14.1 checking installable status
83 http fetch GET 304 https://registry.npmjs.org/progress-bar-webpack-plugin 1229ms (from cache)
84 http fetch GET 304 https://registry.npmjs.org/react 1092ms (from cache)
85 http fetch GET 304 https://registry.npmjs.org/styled-components 309ms (from cache)
86 silly pacote range manifest for progress-bar-webpack-plugin@^1.11.0 fetched in 1338ms
87 silly resolveWithNewModule progress-bar-webpack-plugin@1.11.0 checking installable status
88 silly pacote range manifest for react@^16.4.1 fetched in 1148ms
89 silly resolveWithNewModule react@16.4.2 checking installable status
90 http fetch GET 304 https://registry.npmjs.org/update-notifier 233ms (from cache)
91 http fetch GET 304 https://registry.npmjs.org/react-ace 1170ms (from cache)
92 silly fetchPackageMetaData error for react-ace@^6.1.4 Unexpected end of JSON input while parsing near '...ct-test-renderer":"^1'
93 silly pacote range manifest for styled-components@^3.3.3 fetched in 511ms
94 silly resolveWithNewModule styled-components@3.4.5 checking installable status
95 silly pacote range manifest for update-notifier@^2.5.0 fetched in 403ms
96 silly resolveWithNewModule update-notifier@2.5.0 checking installable status
97 http fetch GET 304 https://registry.npmjs.org/react-dom 1123ms (from cache)
98 silly fetchPackageMetaData error for react-dom@^16.4.1 Unexpected end of JSON input while parsing near '...um":"0f1c547514263f77'
99 http fetch GET 304 https://registry.npmjs.org/webpack 327ms (from cache)
100 http fetch GET 304 https://registry.npmjs.org/ws 212ms (from cache)
101 http fetch GET 304 https://registry.npmjs.org/react-live 1174ms (from cache)
102 silly pacote range manifest for react-live@^1.11.0 fetched in 1218ms
103 silly resolveWithNewModule react-live@1.11.0 checking installable status
104 silly pacote range manifest for webpack@^4.16.1 fetched in 437ms
105 silly resolveWithNewModule webpack@4.17.1 checking installable status
106 silly pacote range manifest for ws@^5.2.2 fetched in 284ms
107 silly resolveWithNewModule ws@5.2.2 checking installable status
108 http fetch GET 304 https://registry.npmjs.org/rmdi 1286ms (from cache)
109 http fetch GET 304 https://registry.npmjs.org/reline 1411ms (from cache)
110 silly pacote range manifest for reline@^1.0.0-beta.3 fetched in 1489ms
111 silly resolveWithNewModule reline@1.0.0-beta.3 checking installable status
112 http fetch GET 304 https://registry.npmjs.org/superbox 1215ms (from cache)
113 silly pacote range manifest for rmdi@^1.0.1 fetched in 1389ms
114 silly resolveWithNewModule rmdi@1.0.1 checking installable status
115 silly pacote range manifest for superbox@^2.1.0 fetched in 1254ms
116 silly resolveWithNewModule superbox@2.1.0 checking installable status
117 http fetch GET 304 https://registry.npmjs.org/webpack-serve 1078ms (from cache)
118 silly pacote range manifest for webpack-serve@^2.0.2 fetched in 1100ms
119 silly resolveWithNewModule webpack-serve@2.0.2 checking installable status
120 http fetch GET 304 https://registry.npmjs.org/webpack-serve-overlay 1126ms (from cache)
121 silly pacote range manifest for webpack-serve-overlay@^0.2.2 fetched in 1148ms
122 silly resolveWithNewModule webpack-serve-overlay@0.2.2 checking installable status
123 timing stage:rollbackFailedOptional Completed in 1ms
124 timing stage:runTopLevelLifecycles Completed in 7751ms
125 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...ct-test-renderer":"^1'
125 verbose stack at JSON.parse (<anonymous>)
125 verbose stack at parseJson (/home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
125 verbose stack at consumeBody.call.then.buffer (/home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50)
125 verbose stack at <anonymous>
125 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7)
126 verbose cwd /home/karan/projects/mdx-resume
127 verbose Linux 4.15.0-33-generic
128 verbose argv "/home/karan/.nvm/versions/node/v8.11.4/bin/node" "/home/karan/.nvm/versions/node/v8.11.4/bin/npm" "i" "-g" "ok-mdx"
129 verbose node v8.11.4
130 verbose npm v6.4.0
131 error Unexpected end of JSON input while parsing near '...ct-test-renderer":"^1'
132 verbose exit [ 1, true ]
System Details:
OS: Ubuntu 16.04
NodeJS Version: 8.11.4 LTS
NPM Version: 6.4.0
Any idea what's going wrong?
karanrajpal14 commented
Nevermind. I nuked my cache and installed it again and it seems to be working fine now.
Still unsure about what went wrong the first time, though.
Sorry!