代码之家  ›  专栏  ›  技术社区  ›  Vishal Sharma

代码未部署在FireBase云上

  •  -1
  • Vishal Sharma  · 技术社区  · 6 年前

    在FireBase Cloud上部署项目时,我的项目出现错误。请告诉我此问题的解决方案。

    C:\Users\Cloud Analogy\Desktop\Notifications\functions>firebase deploy
    
    === Deploying to 'rideservices-620cc'...
    
    i  deploying functions
    Running command: npm --prefix "$RESOURCE_DIR" run lint
    npm ERR! path C:\Users\Cloud Analogy\Desktop\Notifications\%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:\Users\Cloud Analogy\Desktop\Notifications\%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\Cloud Analogy\AppData\Roaming\npm-cache\_logs\2018-08-27T19_50_57_450Z-debug.log
    
    Error: functions predeploy error: Command terminated with non-zero exit code4294963238
    
    C:\Users\Cloud Analogy\Desktop\Notifications\functions>"predeploy": [
    '"predeploy":' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Users\Cloud Analogy\Desktop\Notifications\functions>"npm --prefix %RESOURCE_DIR% run lint"
    '"npm --prefix %RESOURCE_DIR% run lint"' is not recognized as an internal or external command,
    operable program or batch file.
    
    1 回复  |  直到 6 年前
        1
  •  1
  •   James Poag    6 年前

    Firebase.json

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