npm rebuild

把依赖从 windows 拷贝到 linux 上(没有使用 npm install 下载依赖),执行构建时会发生错误。

这时需要执行 npm rebuild 重构一下依赖。

https://docs.npmjs.com/cli/rebuild

切换 node 版本时最好也执行一遍

猜你喜欢

转载自www.cnblogs.com/jhxxb/p/12965423.html
NPM