使用 Easypost 的 Firebase Functions 部署失败 'There was an error deploying Functions'
Firebase Functions deploy fails 'There was an error deploying Functions' with Easypost
世界和平和 Moonbase-36 居民,您好,部署此 firebase 功能失败,因为我已将 EASYPOST 添加到文件中。我是否需要创建另一个函数文件并进行部署才能使其正常运行?
// require('babel-polyfill');
const functions = require("firebase-functions");
const cors = require("cors");
const express = require("express");
const EasyPost = require('@easypost/api');
const EPapi = new EasyPost('YOURAPIKEY');
const app = express();
const stripe = require("stripe")("APIKEY");
只要我注释掉 const EasyPost 和 const EPapi,部署就可以正常工作。但是我们需要 Easypost 才能工作。
firebase functions:log 详细堆栈跟踪:错误:找不到模块 '@easypost/api'
OP 通过使用 npm install Easypost
将 Easypost 安装到 Functions 文件夹中以将其作为 firebase 函数的依赖项来解决此问题。功能部署无误。
世界和平和 Moonbase-36 居民,您好,部署此 firebase 功能失败,因为我已将 EASYPOST 添加到文件中。我是否需要创建另一个函数文件并进行部署才能使其正常运行?
// require('babel-polyfill');
const functions = require("firebase-functions");
const cors = require("cors");
const express = require("express");
const EasyPost = require('@easypost/api');
const EPapi = new EasyPost('YOURAPIKEY');
const app = express();
const stripe = require("stripe")("APIKEY");
只要我注释掉 const EasyPost 和 const EPapi,部署就可以正常工作。但是我们需要 Easypost 才能工作。
firebase functions:log 详细堆栈跟踪:错误:找不到模块 '@easypost/api'
OP 通过使用 npm install Easypost
将 Easypost 安装到 Functions 文件夹中以将其作为 firebase 函数的依赖项来解决此问题。功能部署无误。