nuxt / bridge

🌉 Experience Nuxt 3 features on existing Nuxt 2 projects
MIT License
271 stars 29 forks source link

Error 500 after running #213

Closed jimhucksly closed 2 years ago

jimhucksly commented 2 years ago

Environment

Describe the bug

500
Cannot find module 'D:\pitertour\node_modules\vue\dist\vue.cjs.js\server-renderer' imported from D:\pitertour\.nuxt\dist\server\server.mjs

Reproduction

https://gitlab.com/jimhucksly/pitertour/-/tree/master

Additional context

No response

Logs

No response

danielroe commented 2 years ago

This is because you are aliasing vue to the esm-bundler version, which means that subpath imports from vue/server-renderer and vue/compiler-sfc will fail. It will also lead to memory leaks on server-side in any case.

jimhucksly commented 2 years ago

without

alias: {
    'vue': 'vue/dist/vue.esm-bundler.js'
  }

i get this message

runtime-core.esm-bundler.js:6568 [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js". 
  at <Anonymous> 
  at <Root>
warn2 @ runtime-core.esm-bundler.js:6568
finishComponentSetup @ runtime-core.esm-bundler.js:6417
handleSetupResult @ runtime-core.esm-bundler.js:6353
setupStatefulComponent @ runtime-core.esm-bundler.js:6316
setupComponent @ runtime-core.esm-bundler.js:6250
mountComponent @ runtime-core.esm-bundler.js:4103
hydrateNode @ runtime-core.esm-bundler.js:3308
hydrateSubTree @ runtime-core.esm-bundler.js:4190
componentUpdateFn @ runtime-core.esm-bundler.js:4204
run @ reactivity.esm-bundler.js:160
setupRenderEffect @ runtime-core.esm-bundler.js:4337
mountComponent @ runtime-core.esm-bundler.js:4120
hydrateNode @ runtime-core.esm-bundler.js:3308
hydrate2 @ runtime-core.esm-bundler.js:3223
mount @ runtime-core.esm-bundler.js:3154
app.mount @ runtime-dom.esm-bundler.js:1591
initApp @ entry.mjs:34
async function (async)
initApp @ entry.mjs:28
(anonymous) @ entry.mjs:38
runtime-core.esm-bundler.js:6568 [Vue warn]: Hydration node mismatch:
- Client vnode: Symbol(Comment) 
- Server rendered DOM: <div>​…​</div>​  
  at <Anonymous> 
  at <Root>