Skip to content

Conversation

@BenedyktT
Copy link

Currently using CommonJS require produces an error
TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
To change this error one can either switch to ES6 modules or set the sourceType in the babel config to "unambiguous"

@jayair
Copy link
Member

jayair commented Jan 3, 2021

Hmm are you mixing requires and imports? Or is this coming from a separate package?

@BenedyktT
Copy link
Author

@jayair No, my projects use only CommonJS, perhaps it is because of some of its dependencies.

@jayair
Copy link
Member

jayair commented Feb 17, 2021

I see. I'd like a test case for this. So if we have a simple setup that has this error and then to be able to show that if we set this option, the error goes away.

@hle-aashish
Copy link

Is there any timeline for when this will be available? My projects also use only CommonJS and receiving the same error.

@BenedyktT
Copy link
Author

Sorry I really didn't have time to provide a sample of this behaviour @hle-aashish You are welcome to provide your case, so this one could be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants