运行npm安装时会出现错误。
npm install -g netlify-cli
错误是:
npm WARN deprecated statsd-client@0.4.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! Cannot read properties of null (reading 'pickAlgorithm')
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache\_logs\2022-09-13T23_14_47_800Z-debug-0.log
环境:
操作系统: Windows 10 \x{e76f} reactjs: 18.2.0 \x{e76f}节点: 16.17.0 \x{e76f} npm: 8.17.0
发布于 2022-09-28 09:05:28
跑
npm cache clean --force然后设置npm注册表
npm config set registry https://registry.npmjs.org/ 最后安装软件包
npm install虽然我发现其他用户可以通过清除缓存,然后直接安装包而不配置注册表来使其正常工作,但这对我起了作用。
https://stackoverflow.com/questions/73710071
复制相似问题