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.

Cannot set property data of # which has only a getter

See original GitHub issue

Environment


  • Operating System: Darwin
  • Node Version: v16.13.0
  • Nuxt Version: 3.0.0-27374259.21b664c
  • Package Manager: npm@8.1.0
  • Bundler: Vite
  • User Config: vue, privateRuntimeConfig, publicRuntimeConfig, css, build
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Describe the bug

Cannot set property data of # which has only a getter at $fetchRaw2 (file://./node_modules/ohmyfetch/dist/chunks/fetch.mjs:142:25) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Module.useSettings (file://./.nuxt/dist/server/server.mjs:2947:18) at async setup (file://./.nuxt/dist/server/server.mjs:2446:17)

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pi0commented, Jan 18, 2022

Upstream issue solved in ohmyfetch@0.4.15. You can upgrade with npx nuxi upgrade --force

1reaction
misaoncommented, Jan 18, 2022

Quick temporary fix in your project root package.json:

"resolutions": {
  "node-fetch": "3.1.0"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: setting getter-only property "x" - JavaScript | MDN
The JavaScript strict mode-only exception "setting getter-only property" occurs when there is an attempt to set a new value to a property for...
Read more >
Cannot Set Property ... Which Only Has Getter (javascript es6)
When a property is a getter/setter property, all references to the property go through the getter or setter, including from within the getter...
Read more >
TypeError: Cannot set Property which has only a Getter in JS
The "Cannot set property which has only a getter" error occurs when trying to set a new value to a property, for which...
Read more >
Cannot set property of #<Object> which has only a getter #587
The specific reason this happens is because assigning a property to an object where the property already exists on the prototype chain will ......
Read more >
TypeError: setting getter-only property "x" - JavaScript
There is an attempt to set a new value to a property for which only a getter is specified. While this will be...
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