Cannot assign to read only property 'exports' of object '#<Object>'
See original GitHub issueTranspile of defu back to CommonJS breaks webpack as it doesn’t support mixing different types of imports.
Had to solve it using:
- "@nuxtjs/axios": "^5.12.5",
+ "@nuxtjs/axios": "5.13.1",
Not sure if I did roll back to the exact version that fixes the issue, but that was the last working one for the nuxt project I’m working on.
Might be related to #498 Please check also https://github.com/unjs/defu/issues/28
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Cannot assign to read only property 'exports' of object ...
This error means you are trying to use commonJS inside a ES module. Instead try doing: export default lookup. When you are instantiating...
Read more >Cannot assign to read only property 'exports' of object ... - GitHub
In my react-native-web case, just use an additional webpack rule, then the TypeError: Cannot assign to read only property 'exports' of object is ......
Read more >TypeError: Cannot assign to read only property 'exports' of ...
The error is generated by Webpack and it means you are trying to use CommonJS while you need to use ES modules!
Read more >Error: Uncaught TypeError: Cannot assign to read only proper
Uncaught TypeError : Cannot assign to read only property 'exports' of object '#<Object>' at Object.<anonymous> (mdb.js:9192) at Object.
Read more >Webpack: Cannot assign to read only property 'exports'
Hi, I need to use an external library crypto when running my k6 tests. I'm using the example here: https://github.com/k6io/k6-es6 However on ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see it might be sometimes hard to reproduce. Would be nice if you can try changing
nuxt
tonuxt-edge
(potential fix https://github.com/nuxt/nuxt.js/pull/9180) and it might be also because of different resolution strategy of npm vs yarn (sandbox and tests are based on yarn).In either way if even nuxt-edge didn’t fix the issue, would be happy having a quick call to check issue on your website. (https://calendly.com/pi0)
@rodrigopv I’ve switched to @nuxt/http in that project, but I think it’s still an issue