安装两个不同的ngx石工包时出现相同的解析错误

时间:2018-08-29 21:03:21

标签: angular npm npm-install masonry

尝试以角形实现某种砌体,并且尝试使用ngx-masonry-galleryngx-masonry,但是在安装这两个软件包时,我都会收到以下错误消息

npm ERR! Unexpected token d in JSON at position 702 while parsing near '...get-size":"~1.2.2","desandro-get-style-p...'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/[me]/.npm/_logs/[date]-debug.log

该位置的调试日志每次都会显示相同的消息。

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   'ngx-masonry',
1 verbose cli   '--save' ]
2 info using npm@6.4.0
3 info using node@v6.11.2
4 verbose npm-session e910cbc307ff0f41
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/ngx-masonry 49ms (from cache)
8 silly pacote tag manifest for ngx-masonry@latest fetched in 89ms
9 timing stage:loadCurrentTree Completed in 11039ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 33ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 5025ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule ngx-masonry@1.1.2 checking installable status
17 http fetch GET 200 https://registry.npmjs.org/imagesloaded 25ms (from cache)
18 http fetch GET 200 https://registry.npmjs.org/masonry-layout 33ms (from cache)
19 silly pacote range manifest for imagesloaded@^4.1.1 fetched in 31ms
20 silly resolveWithNewModule imagesloaded@4.1.4 checking installable status
21 silly pacote range manifest for masonry-layout@^4.2.0 fetched in 49ms
22 silly resolveWithNewModule masonry-layout@4.2.2 checking installable status
23 http fetch GET 200 https://registry.npmjs.org/ev-emitter 17ms (from cache)
24 silly pacote range manifest for ev-emitter@^1.0.0 fetched in 20ms
25 silly resolveWithNewModule ev-emitter@1.1.1 checking installable status
26 http fetch GET 200 https://registry.npmjs.org/get-size 12ms (from cache)
27 http fetch GET 200 https://registry.npmjs.org/outlayer 12ms (from cache)
28 silly fetchPackageMetaData error for outlayer@^2.1.0 Unexpected token d in JSON at position 702 while parsing near '...get-size":"~1.2.2","desandro-get-style-p...'
29 silly pacote range manifest for get-size@^2.0.2 fetched in 19ms
30 silly resolveWithNewModule get-size@2.0.3 checking installable status
31 timing stage:rollbackFailedOptional Completed in 14ms
32 timing stage:runTopLevelLifecycles Completed in 16260ms
[. . .silly save tree]
34 verbose stack SyntaxError: Unexpected token d in JSON at position 702 while parsing near '...get-size":"~1.2.2","desandro-get-style-p...'
34 verbose stack     at Object.parse (native)
34 verbose stack     at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
34 verbose stack     at consumeBody.call.then.buffer (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50)
34 verbose stack     at process._tickCallback (internal/process/next_tick.js:109:7)
35 verbose cwd /Users/[me]/Documents/Projects/Web Development/[client]/website/frontend
36 verbose Darwin 16.7.0
37 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ngx-masonry" "--save"
38 verbose node v6.11.2
39 verbose npm  v6.4.0
40 error Unexpected token d in JSON at position 702 while parsing near '...get-size":"~1.2.2","desandro-get-style-p...'
41 verbose exit [ 1, true ]

有人知道这是什么原因吗?如果只是其中一个软件包,我会认为它只是在开发人员身上,但这是相同错误。

谢谢

0 个答案:

没有答案