Node.js fs compatibility not working: fs.readFileSync not implemented

After following https://developers.cloudflare.com/workers/runtime-apis/nodejs/fs/ to setup my Workers project with Node.js fs API compatability, trying to use readFileSync in my application results in the following exception being thrown:
Error: [unenv] fs.readFileSync is not implemented yet!
Error: [unenv] fs.readFileSync is not implemented yet!
Cloudflare Docs
fs
You can use node:fs to access a virtual file system in Workers.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?