遵循firebase 功能入门指南并在尝试部署时遇到一个看似简单的错误:
firebase deploy --only functions
i deploying functions
Running command: npm --prefix $RESOURCE_DIR run lint
npm ERR! path C:\Users\Beat\leginformant\$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
'C:\Users\Beat\leginformant\$RESOURCE_DIR\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
package.json 文件确实存在,正如我的 project/functions/package.json 中的教程所示。尝试更改或打印 RESOURCE_DIR 环境但没有成功。假设它将在 NPM shell 环境中限定范围。
npm 版本:5.6.0
节点版本:8.9.0