Closed wspromise closed 1 day ago
vitePress build failed
Please provide minimal reproducible example, preferably using https://vitepress.new
Please provide minimal reproducible example, preferably using https://vitepress.new
https://stackblitz.com/edit/vite-nnfopi?file=docs%2F.vitepress%2Fconfig.ts
Looks like you haven't saved it. That link is just opening a fork of template.
Looks like you haven't saved it. That link is just opening a fork of template.
https://stackblitz.com/edit/vite-qg6fun?file=docs%2F.vitepress%2Fconfig.ts,package.json
// 引入图标库
import 'https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_11053_364.62f38b08ba47924e13314f4c49fbf675.es5.js';
as the error says this is not supported in node.js.
If you want to add it to client, you need to add it to head - https://vitepress.dev/reference/site-config#head
Thank you, you are right
Describe the bug
build error: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'https:' Error: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'https:' at new NodeError (node:internal/errors:405:5) at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:149:11) at defaultLoad (node:internal/modules/esm/load:99:3) at ModuleLoader.load (node:internal/modules/esm/loader:417:13) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:288:22) at new ModuleJob (node:internal/modules/esm/module_job:63:26) at #createModuleJob (node:internal/modules/esm/loader:312:17) at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:265:34) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:251:17) at async ModuleWrap. (node:internal/modules/esm/module_job:76:21)
Reproduction
,,,
Expected behavior
normal
System Info
Additional context
No response
Validations