问题描述
我正在为Firebase开发一些Cloud Functions,尤其是其中一个对我的功能所依赖的节点模块之一没有问题.
I am developing some Cloud Functions for Firebase, and one in particular does not work to an issue in one of the node modules on which my function depend.
我已经找到问题所在和解决方法,问题是,如果我修改node_modules/文件夹中的源,则该更新不会发送到服务器.我从package.json中删除了依赖项,并做了(在本地修改文件之前):
I already found where is the issue and how to fix it, the problem is that, if I modify the source in node_modules/ folder, that update is not sent to the server.I removed from the package.json the dependency and did (before modify the file locally):
npm install --save pdf2img
但是该函数未更新,错误始终相同.有可能做我愿意做的事吗?
But the function is not updated, the error is always the same.Is it possible to do what I would or not?
感谢任何提供帮助的人!
Thanks for anyone providing help!
推荐答案
感谢Mr.Phoenix的提示,解决方法是:
Thanks to Mr.Phoenix hint, the solution is:
-
分叉存储库(或者在我的情况下,找到已经有此修复程序的分叉).
Fork the repository (or in my case, find a fork that already has the fix).
使用以下命令删除以前的版本:
remove the previous version with:
- 使用以下命令从分支中安装新版本:
这种特定情况下的问题无法解决,因为该库依赖于"gm"以及firebase函数中不可用的其他库
The problem in this specific case cannot be solved because the library relies on "gm" and other libraries that are not available in firebase functions
这篇关于将Node模块的本地修改部署到Firebase的Cloud Functions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!