question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot add property _Ctor, object is not extensible

See original GitHub issue

Version

2.6.11

Reproduction link

https://github.com/mjmnagy/error-sept-10-2020

Steps to reproduce

  1. npm run rollup:inline
  2. Include the package into a nuxt project (I have been doing it internally by replacing the dist folder in node_modules)
  3. npm run dev
  4. Error Cannot add property _Ctor, object is not extensible

What is expected?

  1. 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
mjmnagycommented, Sep 28, 2020

@mjmnagy could you fix the error?

Yes

changed:

components:{
  MyComp:() => import('...')
}

to

import MyComp from '....';

components:{
 MyComp
}
4reactions
MykhailoDevcommented, Aug 4, 2021

A: () => import('@/components/A.vue').then(d => d.default) Great, it’s really work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: can't define property "x": "obj" is not extensible
To fix this error, you will either need to remove the call to Object.preventExtensions() entirely, or move it to a position so that...
Read more >
Object is not extensible error when creating new attribute for ...
data when calling the function), but this didn't seem to be a problem as newData is a new copy of data array... I'm...
Read more >
TypeError: can't define property "x": "obj" is not extensible
To fix this error, you will either need to remove the call to Object.preventExtensions() entirely, or move it to a position so that...
Read more >
JavaScript TypeError - Can't define property "X": "Obj" is not ...
This JavaScript exception can't define property “x”: “obj” is not extensible occurs when Object.preventExtensions() used on an object to ...
Read more >
cannot add property _ctor, object is not extensible - You.com
You must have set Object.preventExtensions() or any library you use is doing the same for you. After this call, you can't add new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found