安装weexpack时遇到问题。 sha1校验和验证似乎失败了。
npm install -g weexpack
npm ERR! code EINTEGRITY
npm ERR! sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY= integrity checksum failed when using sha1: wanted sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY= but got sha1-H0xrYFIJCXPy22raAWsSKzZMeS8=. (2748202 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/khodja/.npm/_logs/2017-07-22T06_49_47_089Z-debug.log
日志:
161 silly resolveWithNewModule tar@1.0.2 checking installable status
162 verbose stack Error: sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY= integrity checksum failed when using sha1: wanted sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY= but got sha1-H0xrYFIJCXPy22raAWsSKzZMeS8=. (2748202 bytes)
162 verbose stack at Transform.on (/usr/local/lib/node_modules/npm/node_modules/ssri/index.js:275:19)
162 verbose stack at emitNone (events.js:110:20)
162 verbose stack at Transform.emit (events.js:207:7)
162 verbose stack at endReadableNT (_stream_readable.js:1045:12)
162 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
162 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
163 verbose cwd /Users/khodja
164 verbose Darwin 16.5.0
165 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "./weex-pack" "--save-optional"
166 verbose node v8.2.1
167 verbose npm v5.3.0
168 error code EINTEGRITY
169 error sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY= integrity checksum failed when using sha1: wanted sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY= but got sha1-H0xrYFIJCXPy22raAWsSKzZMeS8=. (2748202 bytes)
170 verbose exit [ 1, true ]
答案 0 :(得分:1)
我通过将Nodejs和npm降级到旧版本来解决这个问题