Cloud Functions deploy error during lint on Windows: “enoent ENOENT: no such file or directory”

后端 未结 9 2493
轻奢々
轻奢々 2020-11-27 07:07

Following the firebase function getting started guide and getting a seemingly simple error once trying to deploy with:

firebase deploy --only functions

i  d         


        
9条回答
  •  情歌与酒
    2020-11-27 07:52

    Apart from the other suggestions, if you change the preflight/predeploy command from:

    "npm --prefix \"$RESOURCE_DIR\" run lint", OR
    "npm --prefix \"%RESOURCE_DIR%\" run lint"
    

    to

    "npm --prefix ./functions run lint"
    

    the issue seems to get fixed. This also resolves it for both Windows and Linux.

    To see more details, please see this answer (and further thread): https://github.com/firebase/firebase-tools/issues/610#issuecomment-360147507

提交回复
热议问题