人人开源打包部署,gulp 报错:ReferenceError: primordials is not defined


人人开源打包部署,gulp 报错:ReferenceError: primordials is not defined

ReferenceError: primordials is not defined

谷歌之后得到的最佳答案:原链接:https://timonweb.com/posts/how-to-fix-referenceerror-primordials-is-not-defined-error/

1、方法

也许是因为你的gulp版本v3,node版本v12。

解决方法:

  • 将gulp版本升级到v4。
  • 将node版本降级到v11。
  • 将graceful-fs升级到在node v12+下工作的版本4.2.2(推荐)。

2、解决推荐

推荐解决办法:

  1. 在package.json同级目录下新建文件npm-shrinkwrap.json,输入以下内容:
{
"dependencies": {
"graceful-fs": {
"version": "4.2.2"
}
}
}
  1. npm install

  2. npm run gulp 打包即可。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM