Tag: Firebase托pipe

错误403禁止。 没有访问URL的权限

我正在尝试迁移到Firebase。 但在此之前,我通过执行以下步骤进行了一些尝试。 我已经成功添加并部署了云function,但遇到错误 错误:禁止 您的客户端没有权限从该服务器获取URL / app / lol。 执行以下代码时发生这种情况: const functions = require('firebase-functions'); const express = require('express'); const app = express() // tried adding this as middleware // const cors = require('core'({origin: true})) var admin = require('firebase-admin'); // app.use(cors) var serviceAccount = require("./ServiceAccount.json"); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://<my-app>.firebaseio.com/" }); app.get('/lol', (req, res) => { […]

如何从Firebasefunction访问Firebase托pipe文件

我有一个简单的firebase函数,它必须发送一个文件来响应文件在/app/one.html中的请求 我的项目目录结构 blog |____app |____index.html |____one.html |____functions |____index.js 我必须访问one.html并从senFile()发送它 index.js const functions = require('firebase-functions'); exports.blog = functions.https.onRequest((req, res) => { res.status(200).sendFile('app/one.html'); #here I need something to do });

迁移到新控制台后,Firebase部署被破坏 – “错误:需要身份validation”。

将我的应用迁移到新的Firebase控制台(console.firebase.google.com)后,我无法再使用Firebase CLI“firebase deploy”部署静态资产。 我收到消息“错误:需要身份validation”。 起初,我已经更新到最新的CLI,但发现我无法使用它在我的Angular应用程序中更新Firebase的情况下进行部署; 我还没有准备好,直到AngularFire被更新。 所以我降级到旧的CLI,但发现我仍然无法部署。 我试着卸载/重新安装Firebase CLI,Firebase,NodeJS(v4&6),多次login和注销Firebase–没有任何帮助。 我目前正在使用: Firebase CLI:2.15.1 节点:4.4.4 NPM:2.15.1 我也尝试使用“firebase prefs:token”,复制令牌,并通过“firebase deploy –token”使用令牌进行部署。 仍然没有运气。 需要validation。 希望在这个问题上取消阻止部署的一些指导。 谢谢!

Firebase应用程序在localhost:5000 / / / app上运行

当我在本地运行我的Firebase应用程序时,它会在此路线上启动它: 本地主机:5000 / [专案编号] / [区域] /应用 问题是,我的所有post和获取请求没有附加到他们的[projectId] / [区域] /应用程序。 我怎么能打所有我的路线?

Firebase主机设置问题

我只是想做一个简单的设置,以在Firebase上托pipe。 我正在按照( https://www.firebase.com/docs/hosting/guide/deploying.html )中的说明操作,但我错过了一些内容,因为我一直收到以下错误: “firebase”不被识别为内部或外部命令,可操作程序或batch file。“ 我做了什么: 安装了nodejs。 将PATH =设置为C:\ Program Files \ nodejs; 通过控制面板 在cmd: cd C:\Program Files\nodejs npm install -g firebase-tools 改变目录到我的html文件的文件夹 尝试运行firebase app init和firebase init都没有工作,给我同样的错误

尝试连接到本地主机:5000 Firebase时获取“无法获取/”

我正在尝试让Firebase上的本地主机服务器正常工作,但我仍然在浏览器中无法获取以下消息。 我看了一下控制台,它所说的是“ http:// localhost: 5000/404(Not Found)”。 我试图重新运行服务器使用'firebase服务',并没有帮助。 我再次运行“firebase init”,这也没有帮助。 我通过运行'npm install -g firebase-tools'重新安装了firebase工具,然后再次运行firebase服务,但仍然没有任何结果。 不知道是怎么回事,因为它最初是在工作。 我安装了一些grunt插件,并将我的index.html文件移动到html文件夹下,尽pipe我仍然在公用文件夹下有一个index.html文件,但仍然显示'Can not GET /' 我也尝试在不同的浏览器重新启动它们等 我正在使用Mac OS X El Capitan。 让我知道如果你需要更多的信息。 提前致谢

无法执行Firebase部署 – 错误:指定的Firebase无效

完成firebase.com/docs上的所有必要步骤并将我的应用升级到新版本后,我仍然无法使用firebase-tools运行部署。 $ firebase部署MY_APP_NAME 给出如下的堆栈: /usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53 throw err; ^ Error: EACCES: permission denied, open '/Users/myusername/.config/configstore/update-notifier-firebase-tools.json' You don't have access to this file. at Error (native) at Object.fs.openSync (fs.js:634:18) at Object.fs.readFileSync (fs.js:502:33) at Object.create.all.get (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:34:26) at Object.Configstore (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:27:44) at new UpdateNotifier (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:34:17) at module.exports (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:123:23) at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/bin/firebase:5:48) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) 阅读本文无法部署到Firebase。 获取ENOENT错误我试图应用sudo,这有助于更多 – […]

使用firebase托pipenodeJS应用程序

所以我有这个使用angularJS和nodeJS的Web应用程序。 我不想只用localhost来演示我的项目,因为当我键入“node server.js”,然后转到本地主机时,它看起来并不酷。 由于我打算使用Firebase的数据,我注意到,Firebase提供托pipe。 我试了一下,但似乎只托pipeindex.html而不是通过/使用server.js。 我已经为服务器定制了使用/更新的文件。 那么,如何在托pipe时告诉Firebase主机使用我的服务器和相关文件? 是否有可能告诉Firebase,嘿,运行“node server.js”来托pipe我的index.html?