1

尝试在 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
4

1 回答 1

2

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

文件中的初始代码:

{
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint"
    ]
  }
}
于 2018-06-28T11:48:57.500 回答