3

I am using Mac. I have tried to read and implement the solution from this thread, but it doesnt work. Firebase deploy errors starting with non-zero exit code (space in project path)

I get errors when deploying the code to firebase:

i deploying functions Running command: npm --prefix "%RESOURCE_DIR%" run lint npm ERR! path /Users/muchammadagunglaksana/Desktop/tsCobaDoangCloudFunction/%RESOURCE_DIR%/package.json npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/Users/muchammadagunglaksana/Desktop/tsCobaDoangCloudFunction/%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!
/Users/muchammadagunglaksana/.npm/_logs/2018-09-07T09_10_49_146Z-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code254 enter image description here

in firebase.json I have tried to modify and use:

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

enter image description here

but i still get the error message like the picture above, what should I do?

sarah
  • 3,819
  • 4
  • 38
  • 80

2 Answers2

3

%RESOURCE_DIR% is a Windows syntax. You should use $RESOURCE_DIR as you are on Mac.

rd3n
  • 4,440
  • 1
  • 33
  • 45
3

reinitialize your project

firebase init
sabawoon
  • 31
  • 3