alphagov / accessibility-tool-audit

Automated accessibility tools audit
https://alphagov.github.io/accessibility-tool-audit/
MIT License
80 stars 31 forks source link

Fix gulp primordials error #52

Open mgdhs opened 4 years ago

mgdhs commented 4 years ago

When running gulp I get the following error

% gulp
fs.js:39
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:39:5
    at req_ (.../accessibility-tool-audit/node_modules/natives/index.js:143:24)
    at Object.req [as require] (.../accessibility-tool-audit/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (.../accessibility-tool-audit/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)

This is an an issue with gulp 3 and nodejs 12.

The fix is to use npm-force-resolutions. Credit to Valentin on Stack Overflow for describing the general issue and the fix.