firebase - 函数预部署错误:命令以非零退出代码终止
问题描述
我正在尝试使用 cmd 提示在离子框架中部署我的云功能:
firebase deploy --only functions
没关系。但是当我使用 cmd 提示将@types/googlemaps 添加到我的项目中时:
npm install --save @types/googlemaps
当我预部署我的项目时,它有错误:
i deploying functions
Running command: npm --prefix "%RESOURCE_DIR%" run lint
> functions@ lint C:\Users\PhuDuong\Desktop\Project\testFireStore\functions
> tslint --project tsconfig.json
Running command: npm --prefix "%RESOURCE_DIR%" run build
> functions@ build C:\Users\PhuDuong\Desktop\Project\testFireStore\functions
> tsc
../node_modules/@types/googlemaps/index.d.ts(43,25): error TS2304: Cannot find name 'Element'.
../node_modules/@types/googlemaps/index.d.ts(856,32): error TS2304: Cannot find name 'Node'.
../node_modules/@types/googlemaps/index.d.ts(1780,60): error TS2304: Cannot find name 'Document'.
../node_modules/@types/googlemaps/index.d.ts(2601,31): error TS2304: Cannot find name 'HTMLInputElement'.
../node_modules/@types/googlemaps/index.d.ts(2782,34): error TS2304: Cannot find name 'HTMLDivElement'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the functions@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PhuDuong\AppData\Roaming\npm-cache\_logs\2018-11-09T07_31_14_838Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code2
有没有办法来解决这个问题?谢谢
解决方案
推荐阅读
- python - 使用`after`时无法“闪烁”/更改tkinter小部件的颜色
- c++ - Bazel 使用 ccache 构建 C++ 示例失败
- docker - docker swarm 撰写放置约束布尔值或条件
- java - 如何处理对扫描仪的错误用户输入?
- c# - 访问泛型类型的静态嵌套类
- swift - 发送到类的静态函数无法识别的选择器
- javascript - 引导单选按钮不会在谷歌浏览器中触发
- hibernate - 停止具有多对多关系的重复条目
- maven - 将 Nexus 连接到 Confluent 存储库失败
- javascript - Node.js + Express,它可以用单个 cpu 核心处理并行请求吗?