Evorlor
Evorlor

Reputation: 7569

Why is my Firebase Functions emulator not running my changes in Typescript?

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?

Upvotes: 8

Views: 2354

Answers (2)

Kalani Bright
Kalani Bright

Reputation: 129

npm run build -- --watch | firebase emulators:start --only functions

Upvotes: 7

Evorlor
Evorlor

Reputation: 7569

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.

Upvotes: 7

Related Questions