user10808938
user10808938

Reputation:

Deploy a function is successful in terminal but not appear in console

I deploy my function using Mac terminal with sudo firebase deploy.

I get the respond :

=== Deploying to 'first-60012'...

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint /Users/name/Desktop/ME/Projects/first/functions
> eslint .

✔  functions: Finished running predeploy script.
i  functions: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...

✔  Deploy complete!

Going to the console in firebase.com, in functions it says "waiting for your first deploy".

Tried 3 times, and nothing appears.

Upvotes: 7

Views: 2528

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317758

It's almost certain that you didn't export any functions in your index.js, or whatever file is designated as your main entry point into your project. You need to actually write and export some functions in order for firebase deploy to pick them up. No exports means no functions deployed.

If you just created this project using the Firebase CLI and tried to deploy without making any changes to the files that it created for you, at the very least you should open up index.js or index.ts, uncomment the helloWorld function, and save the file that in creates for you by default. Simply not saving the changes to the file might even be your mistake.

Upvotes: 13

Related Questions