ReferenceError: primordials is not defined
如图:
gulp build-md5
fs.js:35
} = primordials;
^
ReferenceError: primordials is not defined
at fs.js:35:5
at req_ (/Users/gavin/workspace/fs/app/train/node_modules/natives/index.js:143:24)
at Object.req [as require] (/Users/gavin/workspace/fs/app/train/node_modules/natives/index.js:55:10)
at Object.<anonymous> (/Users/gavin/workspace/fs/app/train/node_modules/gulp/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! train@2.0.0 build-release: `gulp build-md5`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the train@2.0.0 build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gavin/.npm/_logs/2020-07-08T03_29_44_230Z-debug.log
解决方式:node 版本太新,官方解释需要降级至v12之前版本
npm i -g n
sudo n v11
node --version