无法从Firebase部署Cloud Functions

时间:2018-09-11 15:51:30

标签: firebase google-cloud-functions firebase-cli

我正在构建Angular + Firebase Web应用程序,由于一些复杂的查询,我开始从firebase寻找Cloud Functions。

我的项目如下:

MyProject
   |__ node_modules
   |__ src (with app and my complete project)
   |__ some files like tsconfig.json

因此,我添加了一个库“功能”,然后按照经典教程进行操作:https://firebase.google.com/docs/functions/get-started

MyProject
   |__ node_modules
   |__ src (with app and my complete project)
   |__ some files like tsconfig.json
   |__ functions
           |__ node_modules
           |__ src

但是在使用firebase deploy --only函数时出现问题

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
npm ERR! path E:\Work\MyProject\%RESOURCE_DIR%\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'E:\Work\MyProject\%RESOURCE_DIR%\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

它将创建一个“%RESOURC_DIR%”文件夹,但其中包含package.json。

有什么主意吗?我做错什么了吗?

版本: “ firebase”:“ ^ 5.0.4” “ firebase-functions”:“ ^ 2.0.5”

0 个答案:

没有答案