同一目录 npm install 正常,pnpm install 报错ERR_PNPM_FETCH_404 应该检查什么?npmrc应该使用的是同一个吧
此问题还是源的问题
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
问题解决
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。