An old tool, usually gulp 3 with an outdated graceful-fs, is running on a Node.js version newer than it supports. Upgrade gulp and the dependencies, or switch to an older Node.js with nvm.
Newer Node.js versions removed internals that old releases of graceful-fs relied on. Build tools that bundle that old version fail at startup with this error, which is common in older Ionic and Cordova projects.
- Quick fix: use a Node.js version that the project was built for, for example
nvm install 10 && nvm use 10. - Real fix: upgrade gulp to 4 or later (or move to the framework's current build tooling) and update the Ionic CLI.
- If the culprit is a transitive dependency, check with
npm ls graceful-fsand update the package that pulls in the old version, or use anoverridesentry to forcegraceful-fsto 4.2 or later.
npm ls graceful-fs
nvm use 10
npm install gulp@4 --save-devPin the Node.js version in .nvmrc or engines so the team and CI use the same one.
