-
-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Description
Steps to reproduce:
- Create project using vue cli with vue router, ssr and apollo.
- In Home.vue replace HelloWorld component in
components
withHelloWorld: () => import('@/components/HelloWorld.vue'),
- Error similar to the one below will be shown in terminal after ssr attempt (manual page enter/refresh):
(node:2248) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'props' of undefined
at normalizeProps (E:\Projects\Learning\vue-test-1\node_modules\vue\dist\vue.runtime.common.js:1354:23)
at Object.mergeOptions (E:\Projects\Learning\vue-test-1\node_modules\vue\dist\vue.runtime.common.js:1456:3)
at exports.getMergedDefinition (E:\Projects\Learning\vue-test-1\node_modules\vue-apollo\lib\utils.js:14:27)
at Promise.then.component (E:\Projects\Learning\vue-test-1\node_modules\vue-apollo\ssr\utils.js:188:19)
The origin of the stack trace:
/ssr/index.js
:vm.$createElement
is called with component name and passes it toresolveComponent
/ssr/utils.js
:resolveComponent
callsresolveAsset
that returns function (it is our function that returns import)- that function is later passed to
getMergedDefinition
that passes it to Vue'smergeOptions
mereOptions
reads.options
from it, at this point child is undefined because options exists only on real componentsmergeOptions
is callingnormalizeProps
that attempts to read.props
Metadata
Metadata
Assignees
Labels
No labels