I got this error when trying to run vite React project. I had installed React using scaffolding Vite method using nodejs 22.18.0.
file:///C:/Users/Sk/Documents/react-javascript-vite-22.18.0/node_modules/vite/dist/node/chunks/dep-CMEinpL-.js:9
import fsp, { constants } from "node:fs/promises";
^^^^^^^^^
SyntaxError: The requested module 'node:fs/promises' does not provide an export named 'constants'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
Top comments (0)