-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Which project does this relate to?
Start
Describe the bug
Create a project with target: 'cloudflare-module' and add a CloudFlare durable object class.
I have created a minimal repo based on the start-basic template.
Your Example Website or App
https://github.com/astralarya/tanstack-start-cloudflare-durable-objects
Steps to Reproduce the Bug or Issue
Clone the repo linked above and run:
npm install
npm run devThen visit the locally hosted webpage (probably at port 3000).
Expected behavior
Wrangler should be able to simulate Durable Objects locally during development. Instead, visiting the local webpage gives the following error:
Error: Cannot find module 'cloudflare:workers' imported from '/path/to/repo/tanstack-start-cloudflare-durable-objects/src/utils/durable.ts'
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.128.1
- OS: MacOS
- Browser: Chrome
- Browser Version: 138.0.7204.49
- Bundler: vite
- Bundler Version: v6.3.5
Additional context
The module "cloudflare:workers" is not a regular npm package, but something provided by the Cloudflare runtime in production and Wrangler during development.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels