I experienced this issue a few days ago as well. I realized that trying to fix another issue, I deleted the
node_modules folder and the
package-lock.json file, then run the
npm install command. This made the build to fail with ‘fs/promises’. There are 2 solutions to this issue:
- Download the latest stable Node version. This should have the ‘fs/promises’ module and will fix the issue.
- Delete the
node_modulesfolder and bring back the old
package-lock.jsonfile to ensure that the package versions remain the same. Then run the
npm installcommand and the issue should be fixed.