Skip to content
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

TypeError: assign to read only property 'exports' of object '#<Object>' #993

Closed
BotellaA opened this issue Jan 22, 2019 · 6 comments
Closed
Labels
released Automated label

Comments

@BotellaA
Copy link
Contributor

I am trying to start a new Electron app using VueJS framework. For that, I created a new project using the vue-cli and copied some files from paraview-glance. The project is almost empty but I get this error:

Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    at Module.eval (webpack-internal:///…les/_is-object.js:5)
    at eval (webpack-internal:///…les/_is-object.js:8)
    at Module../node_modules/vtk.js/node_modules/core-js/modules/_is-object.js (app.js:8014)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (webpack-internal:///…it-if-required.js:1)
    at Object../node_modules/vtk.js/node_modules/core-js/modules/_inherit-if-required.js (app.js:7956)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (webpack-internal:///…xp.constructor.js:2)

I do not understand it. To reproduce the error:

git clone https://github.com/BotellaA/geode.git
cd geode
npm install
npm run electron:serve

Thanks a lot for your help!!

@floryst
Copy link
Collaborator

floryst commented Jan 25, 2019

I'm not 100% sure exactly where the issue begins here. This is a result of importing a vtk.js file, but I'm not sure if this is a vue-cli webpack config or something else.

I looked around and found this link: vuejs/vue-cli#2675. Maybe try it to see if it resolves your issue?

@BotellaA
Copy link
Contributor Author

Your proposition did not work.
I found this babel.config.js that works, not sure if this is a good idea.

module.exports = {
  ignore: [/\/core-js/],
  sourceType: "unambiguous",
  presets: ["@vue/app"]
};

@floryst
Copy link
Collaborator

floryst commented Jan 29, 2019

Hm, we don't use core-js (at least not directly). It might be used by vue-cli, but haven't checked. Glad to know you found a solution.

@BotellaA
Copy link
Contributor Author

If you find a better solution or an explanation, feel free to share it 😉

zachmullen added a commit that referenced this issue Feb 6, 2019
Fixes #993 

I tested this on the geode repo and this alleviated the need for the babel.config workaround (namely `ignore: [/\/core-js/]`).
zachmullen added a commit that referenced this issue Feb 6, 2019
Fixes #993

I tested this on the geode repo and this alleviated the need for the babel.config workaround (namely `ignore: [/\/core-js/]`).
@jourdain
Copy link
Collaborator

jourdain commented Feb 6, 2019

🎉 This issue has been resolved in version 8.3.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jourdain jourdain added the released Automated label label Feb 6, 2019
@BotellaA
Copy link
Contributor Author

BotellaA commented Feb 7, 2019

Great I will try! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Automated label
Projects
None yet
Development

No branches or pull requests

3 participants