简体   繁体   English

如何解决启动时出现 Firebase CLI 错误

[英]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所做的一样

Firebase 命令行界面

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.

相关问题 如何解决这个 firebase is not defined 错误? - how to solve this firebase is not defined error? 如何解决 gcloud cli “4047: 'Failed to lookup instance'” 错误 - How to solve gcloud cli "4047: 'Failed to lookup instance'" error FirebaseCommandException:Firebase CLI 发生错误 - FirebaseCommandException: An error occured on the Firebase CLI Firebase Cloud Function - 我该如何解决这个错误:ECONNRESET - Firebase Cloud Function - How can I solve this error: ECONNRESET 如何卸载 Firebase CLI (firebase-tools) - How to uninstall Firebase CLI (firebase-tools) 如何解决 CDK CLI 版本不匹配的问题 - How to solve CDK CLI version mismatch 如何解决 Reactjs 中的“Firebase: Error (auth/invalid-api-key)”错误? - How to solve "Firebase: Error (auth/invalid-api-key)" error in Reactjs? Firebase CLI 部署错误:读取函数/包时出错。json - Firebase CLI deploy Error: There was an error reading functions/package.json 如何解决您的 function 被杀死是因为它在我的 Firebase 模拟器中引发了未处理的错误? - how to solve Your function was killed because it raised an unhandled error in my Firebase emulator? 如何解决:错误:无法列出 Firebase 项目。 有关更多信息,请参阅 firebase-debug.log - How do I solve: Error: Failed to list Firebase projects. See firebase-debug.log for more info
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM