Browser rendering: Cloudflare API error - binding $DurableObject of type durable_object_namespace cannot specify both a class_name and a namespace_id
Describe the bug
When deploying a NuxtHub project with the browser feature enabled, the deployment fails with a Cloudflare API error about Durable Object configuration. The error message states: "binding $DurableObject of type durable_object_namespace cannot specify both a class_name and a namespace_id". The browser feature works correctly in development mode but fails during production deployment.
Steps to reproduce
- Create a NuxtHub project with the browser feature enabled in nuxt.config.ts
- Install required dependencies (@cloudflare/puppeteer and puppeteer)
- Create an API endpoint that uses hubBrowser() (e.g., for screenshot functionality)
- Run the project locally with
pnpm run dev(works fine) - Try to deploy to production using
npx nuxthub deploy - Deployment fails with the Durable Object binding error
Expected behavior
The project should deploy successfully to production with the browser feature working as it does in development.
Additional information
- The error occurs with both CLI deployment (npx nuxthub deploy) and GitHub Actions deployment
- When checking Cloudflare settings, no browser_rendering binding is being created
- NuxtHub version: 0.8.27
- Dependencies are properly installed in package.json
- Workers is enabled in hub config
Full error message
✖ Failed to deploy fred-workers-test to production.
ERROR Cloudflare API error - binding $DurableObject of type durable_object_namespace cannot specify both a class_name and a namespace_id
CC: @frederic-nevers
I have experienced the same issue, but not just with 'browser'. It also happens when adding 'cache', for example