vue: Cannot add property _Ctor, object is not extensible
Version
2.6.11
Reproduction link
https://github.com/mjmnagy/error-sept-10-2020
Steps to reproduce
npm run rollup:inline
- Include the package into a nuxt project (I have been doing it internally by replacing the dist folder in node_modules)
npm run dev
- Error
Cannot add property _Ctor, object is not extensible
What is expected?
- Attempting to create a component library that has SSR support
What is actually happening?
Cannot add property _Ctor, object is not extensible
The package has additional components and i have gone through one by one and tried to eliminate other factors. It seems that when l refresh the page, the error is present but when navigating the components it works.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (1 by maintainers)
Yes
changed:
to
A: () => import('@/components/A.vue').then(d => d.default)
Great, it’s really work for meHi,
Due to a circle dependancy that I need to break with inline import, I had been the same issue.
A:() => async () => (await import('@/components/A.vue')).default,
doesn’t work for me.but I’ve resolve it with:
A: () => import('@/components/A.vue').then(d => d.default)
HTH