I having problem of deploying Firebase Cloud Functions.
Steps to reproduce
Expected Result
Expecting firebase-tools to deploy the cloud functions.
Actual Result
Receive the following error message:
λ firebase deploy
=== Deploying to '<projects>'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
npm ERR! path ...path\firebaseFunction\%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 '...path\firebaseFunction\%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! ...path\AppData\Roaming\npm-cache\_logs\2018-06-17T10_02_45_577Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code4294963238
I have tried googled it and follow the solutions on below link but it doesn't work to me: https://github.com/firebase/firebase-tools/issues/610
Please help!
Thank you.
Try replacing the string "$RESOURCE_DIR"
with "%RESOURCE_DIR%"
in your "firebase.json" file.
Now run the deploy command again. It worked for me.
Explanation: This fix is for Windows because %RESOURCE_DIR%
will be recognized as an environment variable only by Windows command-line interpreters. As an ultimate consequence, the project isn't cross-platform anymore, as mentioned in the answer of this similar question.
1. In firebase.json file
try and replace $RESOURCE_DIR
with %RESOURCE_DIR%
and
"npm --prefix $RESOURCE_DIR run lint" to "npm --prefix %RESOURCE_DIR% run lint"
(the above one just worked around )
2. npm install -g git://github.com/firebase/firebase-tools#master
please try this installation again in ur project folder it should solve the issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With