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:
- Created 3 years ago
- Reactions:35
- Comments:35 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The fix was just released in version
8.4.1
offirebase-tools
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.