Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: miniflare #1

Closed
wants to merge 1 commit into from
Closed

feat: miniflare #1

wants to merge 1 commit into from

Conversation

whilefoo
Copy link
Contributor

@whilefoo whilefoo commented Jan 4, 2024

There are actually two options:

  1. Miniflare: we can use Cloudflare workers directly and use Miniflare as a development server which simulates a real worker environment.
  2. Hono: it's a platform agnostic that can run on Cloudflare workers, AWS lambda, Vercel...so it'd allow us to easily move to a different platform. It's meant to run on edge but it also supports running on Node.

I'm currently testing out the first option and it works when I build the worker but not when I build the local server because of some weird errors:

 [ERROR] Could not resolve "node:util"

    .yarn/cache/@fastify-busboy-npm-2.1.0-960844a007-f22c1e5c52.zip/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js:4:25:
      4 │ const inherits = require('node:util').inherits
        ╵                          ~~~~~~~~~~~

  The Yarn Plug'n'Play manifest forbids importing "node:util" here because it's not listed as a
  dependency of this package:

    .pnp.cjs:659:31:
      659 │         "packageDependencies": [\
          ╵                                ~~

  The package "node:util" 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.

@whilefoo whilefoo requested a review from 0x4007 January 4, 2024 15:26
@whilefoo whilefoo closed this Jan 4, 2024
@whilefoo whilefoo deleted the miniflare branch January 4, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants