@remix-run/node& Cloudflare页面
我正在使用CloudFlare页面模板,并且在任何地方都不会导入 @remix-run/node。 wonkage.json文件不涉及 @remix-run/node 但是,在安装纱线后, @remix-run/node将创建,当我尝试编译时,会发生错误。
X [错误]无法
node_modules/@remix-run/node/upload/fileUploadHandler.js:17:23:
17 │ var promises = require('fs/promises');
╵ ~~~~~
在文件系统上找到“ FS/Promises”软件包“ FS/Promises”,而是内置在节点中的。您是否要捆绑节点?您可以使用“平台:'node'”来完成此错误。 如何解决这个问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己遇到了这个
https:/ /reactjsexample.com/an-example-fisma-working-on-cloudflare-with-remix/
Encountered this myself, trying this
https://reactjsexample.com/an-example-of-prisma-working-on-cloudflare-pages-with-remix/