Skip to content

D1 bindings require module-format workers. [code: 10021] #2

Open
@MilleVenti

Description

Hi, I'm trying to deploy this project , following this tutorial too:
https://developers.cloudflare.com/d1/tutorials/build-a-staff-directory-app/

Locally works fine, but when I try to deploy it I get the following error:

D1 bindings require module-format workers. [code: 10021]

On wrangler.toml I had to put the following entry point
main = "./app/routes/index.tsx"

I cannot see any addEventListener, but only export default in the code, so according to me the worker is already in module-format.

Furthermore in package.json there is:
"type": "module",

wrangler 3.50.0
npm 10.5.0
node v20.12.2
Windows 10

Thank you

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions