Agung
Agung

Reputation: 13843

Error: functions predeploy error: Command terminated with non-zero exit code254

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?

Upvotes: 4

Views: 5946

Answers (2)

sabawoon
sabawoon

Reputation: 41

reinitialize your project

firebase init

Upvotes: 4

rd3n
rd3n

Reputation: 4560

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

Upvotes: 4

Related Questions