Raphaël Ferrand

Fix gulp 3 & node 12 compatibility issues

Mon, September 13, 2021

Jumping between projects I faced a problem. To build my react-native app we needed to get on “Node v12”. Once upgraded to it, and getting back on some Episerver development at the moment of building with Gulp I got some error thwon in the console:

ReferenceError: primordials is not defined

Turns out the issue is that Node 12 and Gulp 3 have compatibility issues.

So, the solution at the moment was found in Tim Kamanin blog post:

  1. In the same directory where you have package.json create an npm-shrinkwrap.json file with the following contents:
{
 "dependencies": {
   "graceful-fs": {
     "version": "4.2.2"
   }
 }
}
  1. Run npm install

That’s it, problem solved 😉 (at least for now. You should probably think about upgrading your Gulp version by now. At least that’s what we did).