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 config of #<Object> which has only a getter

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 8.4.0

Platform: Windows

[REQUIRED] Test case

index.js

const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();

exports.testFunction = functions.https.onRequest(async (req, res) => {

  console.log(req.body);

});

[REQUIRED] Steps to reproduce

the initial emulate worked fine the initial and subsequent deploys work fine the function works fine in production not able to emulate locally anymore.

Console output:

i  emulators: Starting emulators: functions
+  functions: Using node@10 from host.
i  functions: Watching "D:\path\to\functions" for Cloud Functions...
!  functions: Cannot set property config of #<Object> which has only a getter
!  Your function was killed because it raised an unhandled error.

In addition to this issue, it is not clear from output what happened. Nothing in debug logs.

[REQUIRED] Expected behavior

Emulator starts

[REQUIRED] Actual behavior

Emulator fails to start

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:35
  • Comments:35 (7 by maintainers)

github_iconTop GitHub Comments

48reactions
samtsterncommented, May 28, 2020

The fix was just released in version 8.4.1 of firebase-tools

30reactions
iamsrujalcommented, May 29, 2020

Hello guys,

The first check which version you’ve installed mine was 8.1.1 Please update firebase-tools by calling

sudo npm i -g firebase-tools

This will install latest version 8.4.1 And It fixed my issue. In fact, I have installed the latest firebase function and admin “firebase-admin”: “8.12.1”, “firebase-functions”: “3.6.1”,

I hope you’ve fixed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot set property config of #<Object> which has only a getter
I just got the same error when trying to firebase serve . The fix for me was simply to update my firebase-tools to...
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 >
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 >
firebase serve Getting " functions: Cannot set property config ...
I am getting the following error when I try to run firebase serve. I think it started happening after I ran npm -i...
Read more >
Cannot Set Property Start Of # Which Has Only A Getter
Are there any visible reasons for this error in my code? Perhaps the js is trying to access an object of the DOM...
Read more >

github_iconTop Related Medium Post

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