(1)首先删除 $HOME/.node-gyp rm -rf ~/.node-gyp

(2)然后重新安装最新的 node-gyp 包 npm i node-gyp -g

(3)然后移除直接安装但build失败的 nodemodules rm -rf ./project/node_modules

(4)最后重新 npm i -d 就行

 

重新安装node,网址:https://nodejs.org/zh-cn/download/

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2021-12-14
  • 2022-02-22
  • 2021-10-11
猜你喜欢
  • 2021-09-29
  • 2021-06-15
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
相关资源
相似解决方案