I am using the Firebase Functions emulator. But when I make a change to the code, it still runs the old version. I am using Typescript.
How can I get it to run the new version?
I am using the Firebase Functions emulator. But when I make a change to the code, it still runs the old version. I am using Typescript.
How can I get it to run the new version?
As stated in their documentation:
Note: Code changes you make during an active session are automatically reloaded by the emulator. If your code needs to be transpiled (TypeScript, React) make sure to do so before running the emulator.
You can do this by running npm run build
in your functions folder.
npm run build -- --watch | firebase emulators:start --only functions
package.json
in the root dir. "emulators": "npm run build --prefix functions -- --watch | firebase emulators:start"
, which also handles TS. –
Protuberant © 2022 - 2025 — McMap. All rights reserved.