digitalthrive / Harvest

Front-end boilerplate for Gulp with everything you need to get started
MIT License
236 stars 56 forks source link

Gulp 3 incompatible with Node version > 11 #30

Open speeday opened 4 years ago

speeday commented 4 years ago

Hi,

Just need to note to update gulpfile.js file related to Gulp from v3 to v4. As Gulp v3 is incompatible with Node v11+ which shows following issues.

ReferenceError: primordials is not defined

This can be solve in following ways.

  1. Upgrade gulp to v4 . This Solution Will Solve Your Error.
  2. To downgrade Node to v11 by keeping gulp to v3, To Solve This Error.
  3. To pin graceful-fs to version 4.2.2 that’s known to work under Node v12 by keeping gulp to v3.

To apply 3rd Option, follow are the changes needed.

  1. Remove Node_Modules folder from your working directory.
  2. Create an npm-shrinkwrap.json file beside of package.json file.
  3. Add following code in that file. { "dependencies": { "graceful-fs": { "version": "4.2.2" } } }
  4. Now just run npm install

This will solve it.