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.

Vue project is throwing `Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'`

See original GitHub issue

When initializing an amplify project in Vue, an error is thrown: Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

To Reproduce

$ vue init webpack-simple my-project
> [Select All Defaults]
$ cd my-project
$ npm i
$ npm run dev

Works fine! Hooray!

$ npm i aws-amplify aws-amplify-vue

Make changes to main.js and App.vue, per https://aws-amplify.github.io/docs/js/vue

$ amplify init
> [Select All Defaults]
$ amplify push
$ npm run dev

Screenshots image

Desktop (please complete the following information):

  • OS: Linux 16.04 LTS
  • Browser Chrome
  • Version 70.0.3538.110
$ node -v
v10.14.1
$ npm -v
6.4.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
haverchuckcommented, Dec 6, 2018

@murribu @binarytide - We just merged a fix for this into our unstable branch. Please feel free to npm install aws-amplify-vue@unstable to access it.

0reactions
github-actions[bot]commented, Jun 13, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot assign to read only property 'exports' of object ...
The exact error is: Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'. I was unable to fix this issue ......
Read more >
Vue import causing cannot assign to read only property ...
Vue import causing cannot assign to read only property 'exports' of object error ; Uncaught TypeError ; 'exports' of ; Module.eval ; )...
Read more >
Cannot assign to read only property 'exports' of object ...
hi newbie here… i am having trouble importing .vue components template to my root file to my laravel project.
Read more >
TypeError: "x" is read-only - JavaScript - MDN Web Docs
The JavaScript strict mode-only exception "is read-only" occurs when a global variable or object property that was assigned to is a read-only property....
Read more >
Cannot assign to read only property 'exports' of object ERROR ...
[Solved]-Cannot assign to read only property 'exports' of object ERROR after upgrading to Babel 7-babel.js.
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