Getting TypeError: Cannot convert object to primitive value when running firebase emulators:start

Viewed 418

Just updated firebase-tools to 8.4.0 and now getting the following error when running firebase emulators:start:

⚠ TypeError: Cannot convert object to primitive value at Proxy. (/Users/USER/.nvm/versions/node/v13.5.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:311:83)

Please let me know of any additional info needed!

2 Answers

The latest comment on the issue referenced by @RosárioPereiraFernandes says:

In general nobody should be using initializeApp(functions.config().firebase) anymore. The plain initializeApp() is preferred.

I can attest that calling initializeAdd() without passing any arguments allows the emulator to start properly.

It's a regression in 8.3.0 and 8.4.0. For now downgrade to 8.2.0

npm i -g firebase-tools@8.2.0
Related