@remix-run/node& Cloudflare页面

发布于 2025-02-01 22:37:03 字数 423 浏览 6 评论 0原文

我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文