HosseinKarami / fastshell

Fiercely quick front-end boilerplate and workflows, HTML5, Gulp, Sass
https://hosseinkarami.github.io/fastshell/
559 stars 130 forks source link

Gulp 3 incompatible with Node 12/13 #20

Closed drawcard closed 4 years ago

drawcard commented 4 years ago

Hi,

Just a note that the gulpfile.js file should be updated to Gulp 4.x, because Gulp 3 is now out of date and incompatible with later versions of Node. This error gets thrown when running gulp in Node 12+

fs.js:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined

A workaround for now is that the user needs to manually downgrade node to 11.x to get FastShell working.

speeday commented 4 years ago

Yes you are right. Even we can solve it by this three 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.