开发者社区> 问答> 正文

npm install 正常,pnpm install 报错ERR_PNPM_FETCH_404

同一目录 npm install 正常,pnpm install 报错ERR_PNPM_FETCH_404 应该检查什么?npmrc应该使用的是同一个吧

展开
收起
游客qsmrxrwla4m32 2023-01-21 13:09:49 2051 0
1 条回答
写回答
取消 提交回答
  • 此问题还是源的问题

     WARN  GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/eslint/-/eslint-8.49.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
     WARN  GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/react-test-renderer/-/react-test-renderer-18.2.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
     WARN  GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
     WARN  GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/jsdom/-/jsdom-22.1.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
     ERR_PNPM_TARBALL_EXTRACT  Failed to unpack the tarball from "https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/@types/react-dom/-/react-dom-18.2.7.tgz": Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?
    

    npm config list 可以查看到源是 https://packages.aliyun.com/xxx/npm/npm-registry/

    修改源即可解决此问题

    npm config set registry https://registry.npmmirror.com

    重新执行 pnpm install --no-frozen-lockfile

    问题解决

    2023-09-26 10:53:50
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
基于webpack和npm的前端组件化实践 立即下载
基于FAAS构建NPM同步CDN 立即下载
低代码开发师(初级)实战教程 立即下载

相关镜像