foursecond 2022-02-16 19:34 采纳率: 0%
浏览 774
已结题

npm ERR! Cannot destructure property 'package' of 'node.target' as it is null. 应该如何解决

在npm install 时,出现npm ERR! Cannot destructure property 'package' of 'node.target' as it is null.
如图

img

找遍了网上,好像没有这个问题的解决方法
希望可以解答,十分感谢!
  • 写回答

2条回答 默认 最新

  • foursecond 2022-02-16 20:35
    关注

    这个问题我已经解决!

    1. 首先要降npm 的版本号,我是降到了v6, npm i -g npm@6
    2. 然后安装cnpm,npm install -g cnpm --registry=https://registry.npm.taobao.org
    3. 确认cnpm是否安装成功:查看cnpm版本号 cnpm -v
    4. 使用 cnpm install 包的完整名称 ,安装所需要的包
    评论

报告相同问题?

问题事件

  • 系统已结题 2月24日
  • 创建了问题 2月16日