When building for production I get this error for the client build:
OS: Windows 10
Node: v20.6.1
npm: v9.5.1
Astro: 3.1.0
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'virtual:'
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'virtual:'
at new NodeError (node:internal/errors:405:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:207:11)
at defaultLoad (node:internal/modules/esm/load:113:3)
at ModuleLoader.load (node:internal/modules/esm/loader:388:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:270:56)
at new ModuleJob (node:internal/modules/esm/module_job:65:26)
at #createModuleJob (node:internal/modules/esm/loader:282:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:240:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:221:17)
at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:21)
I am running node v20.6.1 but have tried it with v18.x before with the same result.
I guess the @astrojs/vue integration is the problem. There are some imports of import { setup } from 'virtual:@astrojs/vue/app';
My SSR adapter is @astrojs/deno
Here is a full list of my deps
{
"scripts": {
"astro": "astro",
"dev": "astro dev --host",
"build": "astro build",
"preview": "deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs"
},
"dependencies": {
"@astrojs/deno": "^5.0.0",
"@astrojs/vue": "^3.0.0",
"astro": "^3.0.12",
"vue": "^3.3.4"
},
"devDependencies": {
"valibot": "^0.13.1"
}
}
I have never encountered this error before so I would be happy for some feedback!
Building ssr for deno runs smoothly btw. (except the lacking support for Sharp)
Thanks!