Open waelio opened 3 years ago
app.vue
<script setup>
import { ref } from "vue";
let show = ref(false);
setTimeout(() => {
show.value = true;
}, 0);
</script>
<template>
<router-view v-if="show" />
</template>
You can try it,but I don't know why
So in my case there was an issue with the IconLoader config (using unplugin-icons and the default vitesse config) in the vite.config.ts
which caused a component which used the auto-import feature of the loader to crash in the ssg process.
// vite.config.ts -- problematic version
// https://github.com/antfu/vite-plugin-components
ViteComponents({
extensions: ['vue'],
// generate `components.d.ts` for ts support with Volar
globalComponentsDeclaration: true,
// auto import icons
customComponentResolvers: [
// https://github.com/antfu/vite-plugin-icons
ViteIconsResolver({
componentPrefix: '',
// enabledCollections: ['carbon']
}),
],
}),
// vite.config.ts -- fixed version
// https://github.com/antfu/vite-plugin-components
ViteComponents({
extensions: ['vue'],
// generate `components.d.ts` for ts support with Volar
dts: true,
// auto import icons
resolvers: [
// https://github.com/antfu/vite-plugin-icons
ViteIconsResolver({
componentPrefix: '',
enabledCollections: ['carbon'],
}),
],
}),
It seem to be a partial transformation for SFC parts, can you upgrade to the latest version of unplugin-vue-components
and unplugin-icons
to see if it fixes?
I am still having this issue even with the latest version of `unplugin-vue-components` and `unplugin-icons`.
Did you find a solution guys ?
Thanks
Edit: The issue on my side came from using a lowercase name for a component <servicecard />
instead of <ServiceCard/>
Remember to check the case, mac local case is not sensitive, but linux case sensitive. I also encountered this problem because of a wrong capitalization naming, and it was successfully resolved after modification.
Make sure you don't have any unclosed HTML tags or invalid HTML tags in the Markdown file.
I got this error because:
/pages/index.vue
(in case you're using vitesse and have the nuxtStyle
set to the default false
value in vite-plugin-pages)
<route lang="yaml">
meta:
layout: home
</route>
components.d.ts
can actually give you a pretty decent hint! (with nuxtStyle: true
)I'm getting this and have tried stripping out plugins to narrow it down, but I'm not getting anywhere with it. Is there a way to run vite-ssg
with an active debugger on so I can step through the code and extract what is causing it?
UPDATE: I went ahead and just added console log statements to the dependency files. Found out it was unresolved components, but were unresolved because I was removing plugins to find what the original error was; so I may update again.
UPDATE2: The culprit was the order of my plugins... I really wish Vue would give better error output.
Hello The command
pnpm build
started to fail suddenly. The error is very new to me.here is the whole output
Any ideas? Thank you