This is probably not a problem with npm. There is likely additional logging output above.

This is probably not a problem with npm. There is likely additional logging output above.,第1张

使用node打包命令npm run build:prod 时报这个错误。

This is probably not a problem with npm. There is likely additional logging output above.

(1)删除目录下的node_modules目录

(2)删除目录下的 package-lock.json文件

(3)清理npm缓存

(4)重新安装依赖


(1)删除目录下的node_modules目录
rd /s /q node_modules
(2)删除目录下的 package-lock.json文件

将目录中的package-lock.json文件删除(如果有的情况下)

(3)清理npm缓存
npm cache clean --force
(4)重新安装依赖
# 强烈建议不要用直接使用 cnpm 安装,会有各种诡异的 bug,可以通过重新指定 registry 来解决 npm 安装速度慢的问题。
npm install --registry=https://registry.npmmirror.com

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1323011.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-12
下一篇 2022-06-12

发表评论

登录后才能评论

评论列表(0条)

保存