【问题标题】:Why does deployment of firebase project give me a path error?为什么部署firebase项目会给我一个路径错误?
【发布时间】:2018-10-09 10:32:34
【问题描述】:

尝试在 firebase 上部署项目会给我以下错误 任何想法,感谢您的帮助

  sherif Folio $ firebase deploy

=== Deploying to 'plan2-plan2'...

i  deploying functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint
npm ERR! path /home/sherif/functions/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 
'/home/sherif/functions/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!     /home/sherif/.npm/_logs/2018-04-28T22_14_49_737Z- 
debug.log

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

【问题讨论】:

  • 在我为云操作创建代码实验室的前一天,我浏览了代码,似乎我配置了一些我不记得的东西

标签: firebase npm firebase-cli


【解决方案1】:

我也遇到了这样的问题,我最终做的是编辑 firebase.json 文件并将预检命令更改为 npm --prefix ./functions run lint。这似乎适用于 Linux 和 Windows。

文件中的初始代码:

{
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint"
    ]
  }
}

【讨论】:

    猜你喜欢
    • 2013-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-20
    • 2020-10-29
    • 1970-01-01
    • 1970-01-01
    • 2021-08-10
    相关资源
    最近更新 更多