[英]how to solve Firebase CLI error on start up
when I open firebase CLI I get this error:当我打开 firebase CLI 时,我收到此错误:
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我正在使用 windows 10 亲
I got this warning as well, but when I tried to init, serve, and deploy, it worked just fine.我也收到了这个警告,但是当我尝试初始化、服务和部署时,它工作得很好。 Good luck!
祝你好运!
The comment on the original question was the solution for me.对原始问题的评论是我的解决方案。 My "Downloads" folder is hosted on D: and the installer assumes C:
我的“下载”文件夹托管在 D: 上,安装程序假定 C:
( how to solve Firebase CLI error on start up ) ( 如何解决 Firebase CLI 启动错误)
A solution that helped me after transferring the exe to C has failed, is deleting the folder:在将 exe 传输到 C 后帮助我的解决方案失败,删除文件夹:
C:\Users\{YOUR_PROFILE_NAME}\.cache\firebase
Hope this helps anyone希望这对任何人都有帮助
That is nothing to worry about, it only appears because the CLI by default assumes it is in the C directory.这没什么好担心的,它只是因为默认情况下 CLI 假定它位于 C 目录中而出现。
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 .因此,将 CLI exe 复制到任何其他目录都会显示此消息,但您仍然可以根据需要使用所有 CLI 功能。
Like what I did here using firebase init
就像我在这里使用
firebase init
所做的一样
Install Firebase using npm:使用 npm 安装 Firebase:
npm install firebase
source: https://firebase.google.com/docs/web/setup来源: https://firebase.google.com/docs/web/setup
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.