frandiox / vite-ssr

Use Vite for server side rendering in Node
MIT License
829 stars 92 forks source link

SSR Build Error: 'createHead' is not exported by @vueuse/head, imported by xxx #151

Closed domsen123 closed 2 years ago

domsen123 commented 2 years ago

Client Build is OK Server Build is NOK

Error: 'createHead' is not exported by @vueuse/head, imported by src/main.ts

Sometimes:

Error: 'createApp' is not exported by vue, imported by ./node_modules/.pnpm/vite-ssr@0.15.0_976c9ead1ddd75f9af6432879da64cc4/node_modules/vite-ssr/vue/entry-server.js

Config:

ViteSsr({
  ssr: resolve(entryRoot, 'src/entry-server'),
  excludeSsrComponents: [/^@mrx\/plugin-/, /^vuetify/],
  build: {
    clientOptions: {
      build: {
        target: 'esnext',
      },
    },
    serverOptions: {
      build: {
        target: 'esnext',
        rollupOptions: {
          input: resolve(entryRoot, 'src/entry-server.ts'),
          external: [/^vuetify/],
          output: {
            format: 'es',
          },
        },
      },
    },
  },
domsen123 commented 2 years ago

solution: reboot wsl 😅

I dont know, but its working now?!