React Native cli在init上抛出错误

时间:2017-03-06 18:02:32

标签: npm react-native

按照入门指南中的说明操作后,我收到了错误消息:

npm ERR! shasum check failed for /var/folders/0r/s1l9dkd15md66jrq8pqxdfp40000gn/T/npm-29901-04ce9a63/registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
npm ERR! Expected: 59b501603a63232598fff653a36307a26010402e
npm ERR! Actual:   971a856bbe713ad24ec68dd5d7e2c398b82cf05f
npm ERR! From:     https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz

我已粘贴在npm-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   '--save',
1 verbose cli   '--save-exact',
1 verbose cli   'react-native' ]
2 info using npm@3.8.9
3 info using node@v6.2.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData react-native
8 silly fetchNamedPackageData react-native
9 silly mapToRegistry name react-native
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry   raw: 'react-native',
12 silly mapToRegistry   scope: null,
12 silly mapToRegistry   name: 'react-native',
12 silly mapToRegistry   rawSpec: '',
12 silly mapToRegistry   spec: 'latest',
12 silly mapToRegistry   type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/react-native
14 verbose request uri https://registry.npmjs.org/react-native
15 verbose request no auth needed
16 info attempt registry request try #1 at 12:35:35 AM
17 verbose request id 39f7dfd4d27c1aca
18 verbose etag W/"58bd5cde-bf09b"
19 verbose lastModified Mon, 06 Mar 2017 12:58:06 GMT
20 http request GET https://registry.npmjs.org/react-native
21 http 304 https://registry.npmjs.org/react-native
22 verbose headers { date: 'Mon, 06 Mar 2017 16:35:20 GMT',
22 verbose headers   via: '1.1 varnish',
22 verbose headers   'cache-control': 'max-age=300',
22 verbose headers   etag: 'W/"58bd5cde-bf09b"',
22 verbose headers   age: '148',
22 verbose headers   connection: 'keep-alive',
22 verbose headers   'x-served-by': 'cache-ams4147-AMS',
22 verbose headers   'x-cache': 'HIT',
22 verbose headers   'x-cache-hits': '1',
22 verbose headers   'x-timer': 'S1488818120.478200,VS0,VE0',
22 verbose headers   vary: 'Accept-Encoding' }
23 silly get cb [ 304,
23 silly get   { date: 'Mon, 06 Mar 2017 16:35:20 GMT',
23 silly get     via: '1.1 varnish',
23 silly get     'cache-control': 'max-age=300',
23 silly get     etag: 'W/"58bd5cde-bf09b"',
23 silly get     age: '148',
23 silly get     connection: 'keep-alive',
23 silly get     'x-served-by': 'cache-ams4147-AMS',
23 silly get     'x-cache': 'HIT',
23 silly get     'x-cache-hits': '1',
23 silly get     'x-timer': 'S1488818120.478200,VS0,VE0',
23 silly get     vary: 'Accept-Encoding' } ]
24 verbose etag https://registry.npmjs.org/react-native from cache
25 verbose get saving react-native to /Users/t3mplar/.npm/registry.npmjs.org/react-native/.cache.json
26 verbose correctMkdir /Users/t3mplar/.npm correctMkdir not in flight; initializing
27 silly install normalizeTree
28 silly loadCurrentTree Finishing
29 silly loadIdealTree Starting
30 silly install loadIdealTree
31 silly cloneCurrentTree Starting
32 silly install cloneCurrentTreeToIdealTree
33 silly cloneCurrentTree Finishing
34 silly loadShrinkwrap Starting
35 silly install loadShrinkwrap
36 silly loadShrinkwrap Finishing
37 silly loadAllDepsIntoIdealTree Starting
38 silly install loadAllDepsIntoIdealTree
39 silly resolveWithNewModule react-native@0.42.0 checking installable status
40 silly cache add args [ 'react-native', null ]
41 verbose cache add spec react-native
42 silly cache add parsed spec Result {
42 silly cache add   raw: 'react-native',
42 silly cache add   scope: null,
42 silly cache add   name: 'react-native',
42 silly cache add   rawSpec: '',
42 silly cache add   spec: 'latest',
42 silly cache add   type: 'tag' }
43 silly addNamed react-native@latest
44 verbose addNamed "latest" is being treated as a dist-tag for react-native
45 info addNameTag [ 'react-native', 'latest' ]
46 silly mapToRegistry name react-native
47 silly mapToRegistry using default registry
48 silly mapToRegistry registry https://registry.npmjs.org/
49 silly mapToRegistry data Result {
49 silly mapToRegistry   raw: 'react-native',
49 silly mapToRegistry   scope: null,
49 silly mapToRegistry   name: 'react-native',
49 silly mapToRegistry   rawSpec: '',
49 silly mapToRegistry   spec: 'latest',
49 silly mapToRegistry   type: 'tag' }
50 silly mapToRegistry uri https://registry.npmjs.org/react-native
51 verbose addNameTag registry:https://registry.npmjs.org/react-native not in flight; fetching
52 verbose get https://registry.npmjs.org/react-native not expired, no request
53 silly addNameTag next cb for react-native with tag latest
54 silly addNamed react-native@0.42.0
55 verbose addNamed "0.42.0" is a plain semver version for react-native
56 silly mapToRegistry name react-native
57 silly mapToRegistry using default registry
58 silly mapToRegistry registry https://registry.npmjs.org/
59 silly mapToRegistry data Result {
59 silly mapToRegistry   raw: 'react-native',
59 silly mapToRegistry   scope: null,
59 silly mapToRegistry   name: 'react-native',
59 silly mapToRegistry   rawSpec: '',
59 silly mapToRegistry   spec: 'latest',
59 silly mapToRegistry   type: 'tag' }
60 silly mapToRegistry uri https://registry.npmjs.org/react-native
61 verbose addRemoteTarball https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz not in flight; adding
62 verbose addRemoteTarball [ 'https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz',
62 verbose addRemoteTarball   '59b501603a63232598fff653a36307a26010402e' ]
63 info retry fetch attempt 1 at 12:35:37 AM
64 info attempt registry request try #1 at 12:35:37 AM
65 http fetch GET https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
66 http fetch 200 https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
67 info retry will retry, error on last attempt: Error: read ECONNRESET
68 info retry will retry, error on last attempt: Error: read ECONNRESET
69 silly fetchAndShaCheck shasum 59b501603a63232598fff653a36307a26010402e
70 silly rollbackFailedOptional Starting
71 silly rollbackFailedOptional Finishing
72 silly runTopLevelLifecycles Starting
73 silly runTopLevelLifecycles Finishing
74 silly install printInstalled
75 verbose stack Error: shasum check failed for /var/folders/0r/s1l9dkd15md66jrq8pqxdfp40000gn/T/npm-29901-04ce9a63/registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
75 verbose stack Expected: 59b501603a63232598fff653a36307a26010402e
75 verbose stack Actual:   971a856bbe713ad24ec68dd5d7e2c398b82cf05f
75 verbose stack From:     https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
75 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:25:8
75 verbose stack     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:72:7)
75 verbose stack     at emitNone (events.js:91:20)
75 verbose stack     at ReadStream.emit (events.js:185:7)
75 verbose stack     at endReadableNT (_stream_readable.js:926:12)
75 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:74:11)
75 verbose stack     at process._tickCallback (internal/process/next_tick.js:98:9)
76 verbose cwd /Users/t3mplar/Projects/rn/hello
77 error Darwin 15.6.0
78 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "--save-exact" "react-native"
79 error node v6.2.0
80 error npm  v3.8.9
81 error shasum check failed for /var/folders/0r/s1l9dkd15md66jrq8pqxdfp40000gn/T/npm-29901-04ce9a63/registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
81 error Expected: 59b501603a63232598fff653a36307a26010402e
81 error Actual:   971a856bbe713ad24ec68dd5d7e2c398b82cf05f
81 error From:     https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
82 error If you need help, you may report this error at:
82 error     <https://github.com/npm/npm/issues>
83 verbose exit [ 1, true ]

有什么想法可能是什么?我是节点及其工具的新手,所以也许我错过了一些重要的东西。

0 个答案:

没有答案