Error reported by gulp: referenceerror: primordials is not defined

When running gulp related commands, the following error message appears:

reason:
If gulp version v3.9, node version v12.xx
there is a problem that the plug-in can not be used when installing gulp. The problem is that the gulp version is not compatible with the node version.

resolvent:

The syntax of gulp version upgrading to V4 – gulp3 has changed with gulp4. If upgrading, you need to make corresponding changes to gulp configuration file
downgrade the node version to v11 – node version. If the changes are made, the installation packages of other projects that depend on the node environment on the computer may have to be re installed to run correctly
upgrade the graded fs to version 4.2.2 that works under node V12 + (recommended).

Recommended solution:
. Create a new file npm-shrinkwrap.json in the same level directory of package.json, and enter the following contents:

{
    "dependencies": {
        "graceful-fs": {
            "version": "4.2.2"
        }
    }
}


Read More: