Serve atom feed with cloudflare error (Faild to build)

Hey, I want to serve an atom feed over cloudflare and got recommended to use hono with it. Sadly, I have come across an error when trying to build my project and I cant find a solution to it, sorry.
My code:
import { Hono } from "hono";
import { testFeed } from "./createRssFeed";

const app = new Hono();

app.get("/", async content => {
    content.header("Content-Type", "application/atom+xml");
    content.header("Cache-Control", "no-cache");
    
    const feed = testFeed();
    return content.body(feed);
});
export default app;

Error:
Franz3@DESKTOP-CCJAUN6 MINGW64 ~/VSC/qmj-atom-feed (master)
$ npm start

> qmj-atom-feed@0.0.0 start
> wrangler dev

 ⛅️ wrangler 3.51.2
-------------------
[wrangler:inf] Ready on http://127.0.0.1:8787
X [ERROR] Could not resolve "string_decoder"

    node_modules/sax/lib/sax.js:234:25:
      234 │         var SD = require('string_decoder').StringDecoder
          ╵                          ~~~~~~~~~~~~~~~~

  The package "string_decoder" wasn't found on the file system but is built into node.
  Add "node_compat = true" to your wrangler.toml file and make sure to prefix the module name with "node:" to enable Node.js compatibility.


╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ [b] open a browser, [d] open Devtools, [l] turn off local mode, [c] clear console, [x] to exit                                                                                              │╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
X [ERROR] Failed to build


🪵  Logs were written to "C:\Users\Franz3\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2024-04 -21_20-16-49_195.log"
Was this page helpful?