我已经运行了文档,无法让UI防火墙模拟器工作。
我在mac M1上使用firebase版本: 9.22.0
控制台中的警告。
i emulators: Starting emulators: hosting
i hosting: Serving hosting files from: build
✔ hosting: Local server: http://localhost:5001
⚠ emulators: The Emulator UI requires a project ID to start. Configure your default project with 'firebase use' or pass the --project flag.
┌─────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your app. │
└─────────────────────────────────────────────────────────────┘
┌──────────┬────────────────┐
│ Emulator │ Host:Port │
├──────────┼────────────────┤
│ Hosting │ localhost:5001 │
└──────────┴────────────────┘
Emulator Hub running at localhost:4400
Other reserved ports: None我试过使用-项目我的项目,但它仍然不起作用。
Firebase.json
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"emulators": {
"hosting": {
"port": 5001
},
"ui": {
"enabled": true,
"host": "localhost",
"port": 4000
}
}
}我已经确定我的模拟器是安装好的:firebase init emulators
有人能帮上忙吗?我快疯了。
发布于 2021-11-17 18:34:51
我遇到了同样的问题。我不知道它到底采取了什么步骤来解决,因为它花了几次尝试使它为我工作。最后,我执行了以下操作来解决这个问题
npm i -g firebase-tools (我最初运行的是v9.9.0)firebase.json和.firebaserc文件。再次运行dependency.firebase-tools/package.json文件,并使用npm install)更改全局安装的"cli-table": "https://github.com/phess101/cli-table.git" firebase-tools依赖项
我向cli-table项目提交了一个拉请求,希望它能很快被审查和发布。看起来他们最近刚刚发布了一个版本,并破坏了firebase-tools代码https://github.com/Automattic/cli-table/pull/154的这一部分。
https://stackoverflow.com/questions/69999471
复制相似问题