首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启动Firestore /实时数据库的Firebase模拟器?

启动Firestore /实时数据库的Firebase模拟器?
EN

Stack Overflow用户
提问于 2022-02-24 02:52:55
回答 1查看 286关注 0票数 0

我尝试通过个人项目和位于这里的firebase仿真套件Codelab启动Firebase防火墙和实时数据库模拟器:(https://firebase.google.com/codelabs/firebase-emulator#0)使用codelab,命令行在“firebase模拟器:start”之后打印以下内容

代码语言:javascript
复制
[....] codelab-initial-state % firebase emulators:start --import=./seed
i  emulators: Starting emulators: auth, functions, firestore, hosting
⚠  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: database, pubsub, storage
⚠  Your requested "node" version "10" doesn't match your global version "17". Using node@17 from host.
i  firestore: Importing data from /Users/lucasfrench/Documents/emulators-codelab/codelab-initial-state/seed/firestore_export/firestore_export.overall_export_metadata
i  firestore: downloading cloud-firestore-emulator-v1.13.1.jar...
Progress: =====================================================================================================================================================================> (100% of 61MB)
i  firestore: Firestore Emulator logging to firestore-debug.log
i  emulators: Shutting down emulators.
i  functions: Stopping Functions Emulator
i  firestore: Stopping Firestore Emulator
i  hub: Stopping emulator hub

Error: TIMEOUT: Port 8080 on localhost was not active within 60000ms

这是与我的个人项目使用实时数据库仿真器相同的错误。但是,对于其他产品(如auth模拟器)或访问UI仿真器,我没有任何问题。

EN

回答 1

Stack Overflow用户

发布于 2022-07-18 22:03:12

这可能与本期有关。解决办法是指定本地主机地址(例如。127.0.0.1),而不是localhost,并在firebase.json中添加一个主机属性,其中还有127.0.0.1。

https://github.com/firebase/firebase-tools/issues/2379#issuecomment-972852609

代码语言:javascript
复制
"firestore": {
    "port": 8080,
    "host": "127.0.0.1"
},
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71246498

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档