SSR UnhandledPromiseRejectionWarning question
See original GitHub issueDescription
I’m usign “vue-carousel” and setting it up for SSR as shown in the docs (https://gridsome.org/docs/assets-scripts/#without-ssr-support)
Actual result
It’s working ok but I get the following error when running “gridsome build”
Compile assets - 11.7s a (node:3491) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘__esModule’ of undefined
at Re (gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:24010)
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:20995
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:2394
(node:3491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3491) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3491) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘__esModule’ of undefined
at Re (gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:24010)
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:20995
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:2394
(node:3491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3491) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘__esModule’ of undefined
at Re (gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:24010)
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:20995
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:2394
(node:3491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:3491) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘__esModule’ of undefined
at Re (gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:24010)
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:20995
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:2394
(node:3491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:3491) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘__esModule’ of undefined
at Re (gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:24010)
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:20995
at gridsome/node_modules/gridsome/node_modules/vue/dist/vue.runtime.common.prod.js:6:2394
(node:3491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
Render HTML (12 pages) - 0.45s
Process files (0 files) - 0s
Process images (62 images) - 1.83s
My question is, should I be concerned about these errors, or will I always get some kind of error when building?
Environment
Libs:
- gridsome version: 0.5.8
Browser:
For Tooling issues:
- Node version: 10.5.0
- Mac:
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
This is the component
VueCarousel
where I’m using “vue-carousel”And here’s the parent component
What worked with me was that I put vue-carousel in a separate file and then import it and use it like this: