Answers for "functions predeploy error: command terminated with non-zero exit code1"

0

functions predeploy error: command terminated with non-zero exit code1

The error stems from the fact that you have a space somewhere in the path of your project ("Google Drive"):

C:\Users\faruk\Google Drive\Android\firebase\1\$RESOURCE_DIR\package.json
Unfortunately, this is confusing the npm command line, and it's taking that as two arguments separated by that space.

Normally, I would expect to be able to place quotes around the whole thing to keep the space from being interpreted that way. So I tried this:

"predeploy": [
  "npm --prefix \"%RESOURCE_DIR%\" run lint"
]
And it works for me.

I'll follow up with the Firebase team internally about this issue, as well as the fact that changes need to be made for Windows.
Posted by: Guest on March-04-2021

Code answers related to "functions predeploy error: command terminated with non-zero exit code1"

Browse Popular Code Answers by Language