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

后端 未结 9 2514
轻奢々
轻奢々 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 07:41

    Change the following:

    npm --prefix \"$RESOURCE_DIR\" run lint

    to

    npm --prefix \"%RESOURCE_DIR%\" run lint

    in firebase.json file in main structure

    {
      "functions": {
        "predeploy": [
          "npm --prefix \"%RESOURCE_DIR%\" run lint"
        ],
        "source": "functions"
      }
    }
    

提交回复
热议问题