人人開源打包部署,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