在部署期间找不到Firebase init package.json之后

时间:2018-03-01 01:51:31

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

我在两个不同的项目中尝试了两次,并且遇到了同样的错误。安装 node.js 后,执行 npm install -g firebase-tools 。我首先cd到CLI中的项目目录。然后我做了 firebase init ,它运行正常。当我执行 firebase部署时,每次都会收到同样的错误。 我被告知文件丢失(package.json)。我可以在functions文件夹和主目录(whole_painting)中看到这个文件。

Hosting URL: https://entire-painting-ei.firebaseapp.com

c:\xampp\htdocs\Entire_Painting>firebase deploy --only functions

=== Deploying to 'entire-painting-ei'...

i  deploying functions

Running command: npm --prefix $RESOURCE_DIR run lint

npm ERR! path c:\xampp\htdocs\Entire_Painting\$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:\xampp\htdocs\Entire_
Painting\$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\JJ\AppData\Roaming\npm-cache\_logs\2018-03-01T01_39_39_
398Z-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code4294
963238

c:\xampp\htdocs\Entire_Painting>

0 个答案:

没有答案