npm镜像源为taobao
nrm ls
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - https://registry.npm.taobao.org/
nj ----- https://registry.nodejitsu.com/
rednpm - http://registry.mirror.cqupt.edu.cn/
npmMirror https://skimdb.npmjs.com/registry/
edunpm - http://registry.enpmjs.org/
isesol - https://npm_registry.i5sesol.com/
执行命令
npx browserslist@latest --update-db
结果
npx: 6 安装成功,用时 2.53 秒
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Current version: 1.0.30001178
New version: 1.0.30001178
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ yarn add -W caniuse-lite
error https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001178.tgz: Integrity checked failed for "caniuse-lite" (none of the specified algorithms are supported)
Error: Command failed: yarn add -W caniuse-lite
error https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001178.tgz: Integrity checked failed for "caniuse-lite" (none of the specified algorithms are supported)
at checkExecSyncError (child_process.js:616:11)
at Object.execSync (child_process.js:652:15)
at updateDB (/Users/myc/.npm/_npx/17866/lib/node_modules/browserslist/update-db.js:205:18)
at Object.<anonymous> (/Users/myc/.npm/_npx/17866/lib/node_modules/browserslist/cli.js:40:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at /usr/local/lib/node_modules/npm/node_modules/libnpx/index.js:268:14
Problem with `yarn add -W caniuse-lite` call. Run it manually.
尝试去同步caniuse-lite,结果同步失败
执行同步
open https://npm.taobao.org/sync/caniuse-lite
结果
Log
[2021-01-21 14:33:14] user: anonymous, sync caniuse-lite worker start, 1 concurrency, nodeps: false, publish: false, syncUpstreamFirst: true
[2021-01-21 14:33:21] ----------------- Syncing upstream https://r.cnpmjs.org/caniuse-lite/sync/log/18189687 -------------------
[2021-01-21 14:33:21] ----------------- Syncing caniuse-lite -------------------
[2021-01-21 14:34:10] [c#0] [caniuse-lite] package(https://r.cnpmjs.org/caniuse-lite?sync_timestamp=1611210801948) status: 200, dist-tags: {"latest":"1.0.30001178"}, time.modified: 2021-01-17T06:33:39.000Z, unpublished: null, start...
[2021-01-21 14:34:10] [c#0] [error] [caniuse-lite] sync error: ResponseError: socket hang up, GET https://r.cnpmjs.org/caniuse-lite?cache=0&sync_timestamp=1611210850155 -1 (connected: true, keepalive socket: true, agent status: {"createSocketCount":39597,"createSocketErrorCount":0,"closeSocketCount":39591,"errorSocketCount":1516,"timeoutSocketCount":23179,"requestCount":287108,"freeSockets":{},"sockets":{"r.cnpmjs.org:443::::::::::::::::::":6},"requests":{}}, socketHandledRequests: 2, socketHandledResponses: 1)
headers: {}
at connResetException (internal/errors.js:559:14)
at TLSSocket.socketOnEnd (_http_client.js:449:23)
at TLSSocket.emit (events.js:208:15)
at endReadableNT (_stream_readable.js:1168:12)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
[2021-01-21 14:34:10] ----------------- Synced caniuse-lite fail -------------------
[2021-01-21 14:34:10] [done] Sync caniuse-lite package finished, 0 success, 1 fail
Success: [ ]
Fail: [ caniuse-lite ]
Sync caniuse-lite complete! But some packages sync failed, you can refresh to sync again.
请官方帮忙排查一下
淘宝npm镜像站全新上线,Web界面地址:npmmirror.com;npm 客户端使用地址:registry.npmmirror.com
试试这个,找到HBuilderX的安装目录, cmd切换到HBuilderX/plugins/uniapp-cli下 删除node_modules以及package-lock.json 在当前目录执行npm install
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。