Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
549 views
in Technique[技术] by (71.8m points)

google cloud firestore - Running the firebase emulators when the functions directory is in a different project/location

I am running all the firebase emulators locally on a windows 10 machine. However I am running my functions emulator separately as the functions dir is in a different project/location. It appears the triggers are not being emulated and I get the warning below. Everything apart from the trigger/background functions appears to work fine.

Any solutions?

i  emulators: Starting emulators: functions
!  hub: emulator hub unable to start on port 4400, starting on 4401 instead.
!  emulators: It seems that you are running multiple instances of the emulator suite for project myproject-dev. This may result in unexpected behavior.
!  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: auth, firestore, database, hosting, pubsub
!  Your requested "node" version "10" doesn't match your global version "12"
!  logging: Logging Emulator unable to start on port 4500, starting on 4501 instead.
!  ui: Emulator UI unable to start on port 4000, starting on 4003 instead.
i  ui: Emulator UI logging to ui-debug.log
i  functions: Watching "R:myprojectmyprojectCloudfunctions" for Cloud Functions...
!  functions: The Cloud Firestore emulator is not running, so calls to Firestore will affect production.
i  functions[memberUpdate]: function ignored because the firestore emulator does not exist or is not running.

Update: My folder structure.

  1. R:/customer/customer-cloud-project/functions
  2. R:/cusomer/customer-web-app/

I can run all the emulators in location 2 fine except the functions emulator as there is no functions directory. So I run the following in location 1 in the functions folder: firebase emulators:start --only functions

This works fine as it runs 2 instances of the emulator. However the trigger/background functions do not run as it can't find the firestore emulator running on a different port.

question from:https://stackoverflow.com/questions/65945743/running-the-firebase-emulators-when-the-functions-directory-is-in-a-different-pr

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...