Astro Info
Astro v6.0.6
Vite v7.3.1
Node v25.2.1
System Windows (x64)
Package Manager pnpm
Output server
Adapter @astrojs/vercel (v10.0.1)
Integrations @astrojs/sitemap (v3.7.1)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When doing a pnpm build, it terminates with an error where rollup failed to resolve import virtual:astro routes from virtual:astro:manifest. I was getting this in vercel, but also in local.
pnpm run build
> [email protected] build D:\Users\XXXXXXX\Documents\Github\project-web
> astro build
14:17:12 [vite] Re-optimizing dependencies because lockfile has changed
14:17:12 [types] Generated 149ms
14:17:12 [build] output: "server"
14:17:12 [build] mode: "server"
14:17:12 [build] directory: D:\Users\XXXXXXX\Documents\Github\project-web\dist\
14:17:12 [build] adapter: @astrojs/vercel
14:17:12 [build] Collecting build info...
14:17:12 [build] ✓ Completed in 198ms.
14:17:12 [build] Building server entrypoints...
14:17:13 [vite] ✓ built in 1.21s
14:17:15 [vite] ✓ built in 1.94s
14:17:15 [ERROR] [vite] ✗ Build failed in 228ms
[vite]: Rollup failed to resolve import "virtual:astro:routes" from "virtual:astro:manifest".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
Location:
D:\Users\XXXXXXX\Documents\Github\project-web\node_modules\.pnpm\[email protected]_@[email protected]_1f92fa69447a5c463e82235c2a65bf5a\node_modules\vite\dist\node\chunks\config.js:33635:57
Stack trace:
at viteLog (file:///D:/Users/XXXXXXX/Documents/Github/project-web/node_modules/.pnpm/[email protected]_@[email protected]_1f92fa69447a5c463e82235c2a65bf5a/node_modules/vite/dist/node/chunks/config.js:33635:57)
at onLog (file:///D:/Users/XXXXXXX/Documents/Github/project-web/node_modules/.pnpm/[email protected]_@[email protected]_1f92fa69447a5c463e82235c2a65bf5a/node_modules/vite/dist/node/chunks/config.js:33467:4)
at Object.logger [as onLog] (file:///D:/Users/XXXXXXX/Documents/Github/project-web/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:22968:9)
at file:///D:/Users/XXXXXXX/Documents/Github/project-web/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:21670:26
ELIFECYCLE Command failed with exit code 1.
In dev
14:30:11 [ERROR] [vite] Internal server error: Failed to resolve import "virtual:astro:routes" from "virtual:astro:manifest". Does the file exist?
Plugin: vite:import-analysis
File: virtual:astro:manifest:4:29
2 | import { deserializeManifest as _deserializeManifest } from 'astro/app';
3 | import { renderers } from 'virtual:astro:renderers';
4 | import { routes } from 'virtual:astro:routes';
| ^
5 | import { pageMap } from 'virtual:astro:pages';
When donwgrading to astro 5the issue disappears
What's the expected result?
The expected result is to build correctly
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-kujhr8er?file=src%2Fpages%2Findex.astro
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When doing a pnpm build, it terminates with an error where rollup failed to resolve import virtual:astro routes from virtual:astro:manifest. I was getting this in vercel, but also in local.
In dev
When donwgrading to astro 5the issue disappears
What's the expected result?
The expected result is to build correctly
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-kujhr8er?file=src%2Fpages%2Findex.astro
Participation