firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Firebase deploy Issue.

Open koz01 opened this issue 8 years ago • 29 comments

Hi Firebase developer, Please help me. When i deploy firebase could function, i facing the following error.

D:\Development\functions-firecast\functions>firebase deploy --only functions

=== Deploying to 'onthegomex-c10e8'...

i deploying functions Running command: npm --prefix $RESOURCE_DIR run lint npm ERR! path D:\Development\functions-firecast$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 'D:\Development\functions-firecast$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\Administrator\AppData\Roaming\npm-cache_logs\2018-02-01T02_29_22_303Z-debug.log

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

D:\Development\functions-firecast\functions>

koz01 avatar Feb 01 '18 02:02 koz01

I already look up this #610 (comment) but it can't fix me.

koz01 avatar Feb 01 '18 03:02 koz01

Ping @tinaliang @mbleigh

merlinnot avatar Feb 01 '18 03:02 merlinnot

@koz01 what platform are you running this on? Could you also run firebase deploy --only functions --debug and paste the output here?

tinaliang avatar Feb 01 '18 06:02 tinaliang

Would you tell me why you close this issue? Did you resolve this issue?

seungha-kim avatar Feb 08 '18 02:02 seungha-kim

npm install -g git://github.com/firebase/firebase-tools#master fixed the issue

FatmaMM avatar Feb 11 '18 08:02 FatmaMM

I got the same issue with a generic deploy command. Installing the tools from github like FatmaMM suggests, as opposed to the instructions on the google site, solves the issue.

yvanvds avatar Feb 18 '18 22:02 yvanvds

I got the same error. Just copy these files node_modules, .eslintrc.json, package.json into $RESOURCE_DIR file. And then deploy.

Maruthi-Manoj avatar Feb 25 '18 17:02 Maruthi-Manoj

@Maruthi-Manoj

And where am i supposed to find these files ?

Xsmael avatar Mar 16 '18 22:03 Xsmael

@Xsmael Go to the location where you installed firebase. you can find node_modules, .eslintrc.json, package.json files in functions folder.

Maruthi-Manoj avatar Mar 28 '18 07:03 Maruthi-Manoj

I have the same problem, running npm install -g git://github.com/firebase/firebase-tools#master not fix my problem: firebase deploy --only functions

fdambrosio avatar Apr 09 '18 14:04 fdambrosio

Can you run the commands npm --prefix "$RESOURCE_DIR" run lint and npm --prefix "$RESOURCE_DIR" run build seperately.

ArjunAtlast avatar Jun 14 '18 15:06 ArjunAtlast

The same problem .... npm install -g git://github.com/firebase/firebase-tools#master Nothing solved it

wlaa41 avatar Jun 18 '18 10:06 wlaa41

For each new person that is landing on this issue, please open a separate issue, since each case is unique and may not be related, we really need to see the logs for your specific case to be able to diagnose anything.

laurenzlong avatar Jun 19 '18 23:06 laurenzlong

For me change this to this fix it

Yes, my function folder was named functions

image

Thaina avatar Jun 25 '18 06:06 Thaina

@Thaina's solution resolved this issue for me.

danmalone89 avatar Jun 25 '18 20:06 danmalone89

Tenía el mismo problema y o solucioné gracias a lo que comento @Thaina

Gracias

claudio910103 avatar Jun 26 '18 16:06 claudio910103

People, I want to add that my fix is just a hack to make it work in the meantime

The real problem seem like firebase try to use $RESOURCE_DIR for an environment variable around the project to find the folder name of the functions. I'm not sure why it does not work as they expected. But it better to have someone report this bug as a separate issue and have firebase people truly fix the root cause

Thaina avatar Jun 26 '18 17:06 Thaina

thanks @Thaina you've found the problem

fdambrosio avatar Jun 27 '18 09:06 fdambrosio

This is a known problem with the Firebase CLI 3.17.0 through at least 3.17.3, but only on Windows. You can fix this on your machine by editing firebase.json at the root of your project and replacing $RESOURCE_DIR with %RESOURCE_DIR% in the npm commands you see there. The former is the unix syntax way to use an environment variable, whereas the latter is the Windows command shell syntax. Since you're using Windows, you need to use the Windows syntax.

The team is looking into ways to prevent having to make changes to the config files you use, as it's not really convenient for teams that works across platform to keep changing the same file back and forth.

vasu2652 avatar Jun 29 '18 06:06 vasu2652

Nice m8

russellinho avatar Jul 06 '18 15:07 russellinho