windows - 为 Firebase 模拟器打包 JSON 脚本
问题描述
我正在尝试添加一个脚本来使用从 Google 平台下载的密钥运行模拟器,但我在定位 json 文件时遇到了一些问题。它与 package.json 文件放在同一目录中
这是在 Windows 机器上
"scripts": {
"lint": "eslint .",
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log",
"emulator": "set GOOGLE_APPLICATION_CREDENTIALS=key.json && firebase emulators:start"
},
npm 运行模拟器
! Error: Failed to read credentials from file key.json : Error: ENOENT: no such file or directory, open 'key.json '
解决方案
推荐阅读
- mysql - reactjs - 如何在reactjs的搜索查询中从数据库中获取数据?
- javascript - 在 Elementor 弹出窗口中填写输入字段
- react-native - 显示来自 Firestore React native 的日期
- reactjs - 不变性问题:警告:组件正在将受控输入更改为不受控制。(的反面
- python - Python:使用 PyPDF2 读取 PDF 会导致多余的空白错误
- amazon-web-services - 将 DockerOperator 与 Airflow 一起使用时获取服务器 API 版本时出错
- mysql - 无法使用 phpmyadmin 以 root 身份访问 Mysql DB
- javascript - Typescript & react-navigation:NavigationContainer ref 上的类型信息?
- node.js - 如何从 POST 请求中获得干净的响应并将其保存在 json 文件中
- docker - Zsh - 导出:在此上下文中无效:charge"}'