Reputation: 1470
when I open firebase CLI I get this error :
Let's make sure your Firebase CLI is ready...
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at ChildProcess.<anonymous> (C:\snapshot\firepit\welcome.js:115:27)
at ChildProcess.emit (events.js:311:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:311:20)
at Pipe.<anonymous> (net.js:668:12)
I am using windows 10 pro
Upvotes: 30
Views: 19813
Reputation: 76
None above helped (neither to move from drive D to C nor binary file rename), but I deleted %USER_PROFILE%/.cache/firebase instead.
Upvotes: 0
Reputation: 41
It worked for me when i downloaded firebase-tools-win.exe
instead of firebase-tools-instant-win.exe
from https://github.com/firebase/firebase-tools/releases even after renaming it.
Upvotes: 4
Reputation: 76
I faced the same error. What helped me is to rename it back to the original name :firebase-tools-instant-win.exe. Previously I renamed it to firebase.exe, it seems that this caused the problem for me.
Upvotes: 1
Reputation: 11
leave the exe name as: "firebase-win.exe" and you can move it to whatever folder you want worked for me when in C drive
Upvotes: 1
Reputation: 3147
leave the exe name as: "firebase-win.exe"
and you can move it to whatever folder you want
i moved the executable i downloaded ("firebase-tools-instant-win.exe"
) to folder: c:\firebase\bin
and it works without any error,
but for some reason if i rename the exe file to something like: "firebase.exe"
or "fbcli.exe"
it will throw the json error and will not download the .cache
folder correctly
but if i rename the exe name to: "firebase-win.exe"
it works no matter what folder i put it in,
when checking C:\Users{YOUR_PROFILE_NAME}.cache\firebase\runtime\shell.bat
if the exe name is: "firebase.exe"
(Not working) then the content is:
@echo off
"C:\firebase\bin\firebase.exe" C:\Users\{YOUR_PROFILE_NAME}\CACHE~1\firebase\runtime\shell.js %*
if the exe name is: "firebase-win.exe"
(working) then the content is:
@echo off
"C:\firebase\bin\FIREBA~1.EXE" C:\Users\shaybc\.cache\firebase\runtime\shell.js %*
so i simply left the exe name: "firebase-win.exe"
valid names worked for me:
Upvotes: 8
Reputation: 11
Install Firebase using npm:
npm install firebase
source: https://firebase.google.com/docs/web/setup
Upvotes: 0
Reputation: 3838
That is nothing to worry about, it only appears because the CLI by default assumes it is in the C directory.
So, copying the CLI exe to any other directory would show this message but, you can still use all the CLI functionalities as you wish.
Like what I did here using firebase init
Upvotes: 13
Reputation: 331
A solution that helped me after transferring the exe to C has failed, is deleting the folder:
C:\Users\{YOUR_PROFILE_NAME}\.cache\firebase
Hope this helps anyone
Upvotes: 18
Reputation: 534
The comment on the original question was the solution for me. My "Downloads" folder is hosted on D: and the installer assumes C:
(how to solve Firebase CLI error on start up)
Upvotes: 29
Reputation: 1
I got this warning as well, but when I tried to init, serve, and deploy, it worked just fine. Good luck!
Upvotes: -2