-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Version
3.0.7
Reproduction link
https://github.com/carlosmaniero/vue-create-component-instance-error
Steps to reproduce
- Clone the project: https://github.com/carlosmaniero/vue-create-component-instance-error
- Build the project
yarn
yarn start
- Open http://localhost:8080/
- Look at the browser console.
More info:
There is also this webpack warning:
WARNING in ./node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js 96:63-70
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/@vue/server-renderer/index.js
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/HelloWorld.vue?vue&type=template&id=b9167eee&scoped=true
@ ./src/components/HelloWorld.vue?vue&type=template&id=b9167eee&scoped=true
@ ./src/components/HelloWorld.vue
@ ./main.js
@ ./browser.js
What is expected?
To have SSR working 😀
What is actually happening?
TypeError: Cannot destructure property 'createComponentInstance' of 'r.ssrUtils' as it is null.
If I remove this line from webpack server config:
https://github.com/carlosmaniero/vue-create-component-instance-error/blob/master/webpack.server.js#L14
I have the same error from server.
Also, I'm using the webpack configuration provided by @vue/cli-service
. All I did was about to remove some stuff I didn't want to use.
There is this workaround:
resolve: { mainFields: ['main', 'module'] }
Extracted from: #2244 (comment)
However, it increases significantly the build time beyond that it also result in an empty hydration result.
Metadata
Metadata
Assignees
Labels
No labels