-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Description
I am currently trying to migrate my project from using OpenNext to vinext for Cloudflare Workers deployment.
The Worker successfully builds the app using vinext deploy but fails at the end because of this error.
2026-03-07T16:19:03.984Z Deploying to production...
2026-03-07T16:19:06.473Z Error: Command failed: /opt/buildhome/repo/node_modules/.bin/wrangler deploy
2026-03-07T16:19:06.474Z ✘ [ERROR] Build failed with 1 error:
2026-03-07T16:19:06.474Z
2026-03-07T16:19:06.474Z ✘ [ERROR] Could not resolve "virtual:vinext-rsc-entry"
2026-03-07T16:19:06.474Z
2026-03-07T16:19:06.474Z node_modules/vinext/dist/server/app-router-entry.js:15:23:
2026-03-07T16:19:06.474Z 15 │ import rscHandler from "virtual:vinext-rsc-entry";
2026-03-07T16:19:06.474Z ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-03-07T16:19:06.474Z
2026-03-07T16:19:06.474Z You can mark the path "virtual:vinext-rsc-entry" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
This is my next.config.mjs
// next.config.mjs
/** @type {import('next').NextConfig} */
export default {
productionBrowserSourceMaps: false,
allowedDevOrigins: ["*"],
transpilePackages: ["@modlin/ui"],
}This is my vite.config.ts
// vite.config.ts
import vinext from "vinext"
import { defineConfig } from "vite"
export default defineConfig({
plugins: [vinext()],
build: {
sourcemap: false,
},
})This is my wrangler.jsonc
{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "web",
"main": "./worker/index.ts",
"compatibility_date": "2026-03-07",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": "dist/client",
"not_found_handling": "none",
"binding": "ASSETS"
},
"images": {
"binding": "IMAGES"
},
"upload_source_maps": false,
}This is my package.json
{
"$schema": "https://json.schemastore.org/package",
"name": "web",
"version": "0.1.0",
"dependencies": {
"@modlin/ui": "latest",
"next": "^16.1.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"vinext": "^0.0.23",
},
"private": true,
"scripts": {
"dev": "vinext dev",
"build": "vinext build",
"start": "vinext start",
"deploy": "vinext deploy",
"lint": "biome check",
"format": "biome format --write",
},
"type": "module",
"devDependencies": {
"@cloudflare/vite-plugin": "^1.26.1",
"@tailwindcss/postcss": "^4.2.1",
"@types/bun": "^1.3.9",
"@types/node": "^25.3.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-rsc": "^0.5.21",
"postcss": "^8.5.6",
"tailwindcss": "^4.2.1",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"wrangler": "^4.68.0"
}
}Please help me and if you need more context please feel free to ask me.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels