firebase cli 工具 firebase init 不起作用

Adr*_*ich 1 firebase-hosting firebase-cli

I\xc2\xb4m 尝试运行 firebase cli 来创建主机项目,但返回以下内容 ->

\n\n
\n

平台信息

\n
\n\n

在 Windows 上

\n\n
\n

重现步骤

\n
\n\n

firebase初始化

\n\n
\n

预期行为

\n
\n\n

在项目根目录创建配置文件 firebase.json

\n\n
\n

实际行为

\n
\n\n

您将在此目录中初始化一个 Firebase 项目:

\n\n
D:\\projetos\\portfolio_project\\jobs\\templates\n\n[info]\n=== Project Setup\n[info]\n[info] First, let's associate this project directory with a Firebase project.\n[info] You can create multiple project aliases by running firebase use --add,\n[info] but for now we'll just set up a default project.\n[info]\n[debug] [2018-10-18T15:03:51.589Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?page_size=100\n\n[debug] [2018-10-18T15:03:53.158Z] <<< HTTP RESPONSE 200\n[debug] [2018-10-18T15:03:53.795Z] TypeError: Cannot read property 'projectId' of undefined\nat C:\\Users\\adrie\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\init\\features\\project.js:48:23\nat arrayMap (C:\\Users\\adrie\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\lodash\\lodash.js:639:23)\nat Function.map (C:\\Users\\adrie\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\lodash\\lodash.js:9556:14)\nat C:\\Users\\adrie\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\init\\features\\project.js:46:21\nat process._tickCallback (internal/process/next_tick.js:68:7)\n[error]\n[error] Error: An unexpected error has occurred.\n
Run Code Online (Sandbox Code Playgroud)\n\n

任何人?

\n

小智 5

尝试去https://console.firebase.google.com/建立一个项目。当我在 firebase 控制台中构建了一个项目后,它在执行firebase init.