【发布时间】:2018-06-28 22:38:34
【问题描述】:
我有一个全新的 firebase 工具安装(在此 tutorial 之后),我正在尝试上传我的第一个 firebase 功能。我在运行 firebase init 时初始化的 hello-world 示例中遇到了这个问题(在初始化期间唯一设置函数 CLI 功能)
如果我将firebase.json 中的$RESOURCE_DIR 替换为我的函数文件夹,它可以工作,但当然这是不好的做法,我想找到一个合适的$RESOURCE_DIR 替换工作。
PS D:\workspace\firebase-functions> firebase deploy
=== Deploying to 'newagent-5221d'...
i deploying functions
Running command: npm --prefix $RESOURCE_DIR run lint
npm ERR! path D:\workspace\firebase-functions\$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 'D:\workspace\firebase-functions\$RESOURCE_DIR\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dtlut\AppData\Roaming\npm-cache\_logs\2018-01-19T15_57_22_990Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code4294963238
【问题讨论】:
-
您能否概述一下从您运行
firebase init的那一刻开始,您重现此问题所采取的确切步骤系列? -
我在初始化之后并在取消注释 hello world 代码之后尝试了它。两者都给出了这个问题。但是接受的答案解决了它。
标签: firebase npm google-cloud-functions