![](/img/trans.png)
[英]React + Firebase Cloud Functions in Typescript fails to deploy
[英]Firebase Functions deploy fails 'There was an error deploying Functions' with Easypost
世界和平和 Moonbase-36 居民,您好,部署此 firebase function 失败,因为我已将 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 功能:日志详细堆栈跟踪:错误:找不到模块“@easypost/api”
OP 通过使用npm install Easypost
到 Functions 文件夹中以将其作为 firebase 函数的依赖项来解决此问题。 功能部署无误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.