-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot assign to read only property 'exports' of object '#<Object>' #501
Cannot assign to read only property 'exports' of object '#<Object>' #501
Comments
Can you please help to create a reproduction by forking this sandbox? That would be much help in finding the issue. Knowing exact versions of nuxt, node and axios that causes this can also be helpful. |
Hi, Unfortunately I've been unable to isolate the environment in the sandbox you sent to reproduce the bug. I've been trying a couple hours from now, importing almost all packages. The nuxt site I'm working on it's a pretty complex project. From package-lock.json:
The project itself has 54 dependencies and I'll keep trying to make the minimum set of packages needed to trigger this bug. From what I've read, in order to trigger the error, webpack should try to make a bundle that includes different types of imports (from dependencies that use export default, module.exports and require). |
I see it might be sometimes hard to reproduce. Would be nice if you can try changing 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) |
I finally managed to reproduce the issue 🔥 https://codesandbox.io/s/polished-haze-l8j4k on nuxt.config.js:
and the following packages:
I'm not really sure if this the right way to use babel, as there is also a @nuxt/babel-preset-app package (I started working on an existing codebase with this). |
Forgot to comment that nuxt-edge doesn't solves this case and also both yarn and npm get into the same result |
Hi @rodrigopv. I added a fix that solves both sandbox error and keeping ie11 compat. Can you please try v5.13.5? (updated sandbox https://codesandbox.io/s/interesting-chatelet-ewxew?file=/package.json) |
I think we still have a problem here |
Thank you for fast reply, seems like I've messed with enviroment |
Sorry for the delay in testing the new version. It seems that new release Please note that:
Also seen on Chrome console:
This is happening on the same project that uses babel transpile for some reason (I think we should get rid of IE11 anyway). |
I have the same issue. It happened to me after doing |
adding |
@rodrigopv I've switched to @nuxt/http in that project, but I think it's still an issue |
Transpile of defu back to CommonJS breaks webpack as it doesn't support mixing different types of imports.
Had to solve it using:
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 unjs/defu#28
The text was updated successfully, but these errors were encountered: