@remix-run/node & Cloudflare page

1.4k Views Asked by At

I'm using cloudflare page template and I don't import @remix-run/node anywhere. Also package.json file doesn't involve @remix-run/node But after yarn install, @remix-run/node is created and when I try to compile then an error occurs.

X [ERROR] Could not resolve "fs/promises"

node_modules/@remix-run/node/upload/fileUploadHandler.js:17:23:
  17 │ var promises = require('fs/promises');
     ╵                        ~~~~~

The package "fs/promises" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. How can I resolve this problem?

1

There are 1 best solutions below

0
On