gpt4 book ai didi

firebase - 'Firebase init'命令未创建package.json,index.js和function文件夹

转载 作者:行者123 更新时间:2023-12-04 13:30:47 25 4
gpt4 key购买 nike

我现在正在尝试为Google Home创建一个教程应用程序,但遇到了一些麻烦。根据this tutorial,我完成了构建实现的以下步骤。

1.Download and install Node.js.
2.npm install -g firebase-tools
3.firebase login
4-1.mkdir sillynamemaker
4-2.cd sillynamemaker
4-3.firebase init
5.select Functions:…
6.select action project(silllynamemaker-***)
7.firebase init

但是在第7步之后,当前文件夹中只有“firebase.json”,因此我看不到函数文件夹,package.json和index.js。

我的控制台日志如下。
$ node -v
v8.6.0
$ npm --version
5.3.0
$ firebase --version
3.13.1

$ firebase init
You're about to initialize a Firebase project in this directory: ~/ghome/sillynamemaker

? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices.
⚠ You have have not selected any features. Continuing will simply associate this folder with a Firebase project. Press Ctrl + C if you want to start over.

=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.

? Select a default Firebase project for this directory: SillyNameMaker (sillynamemaker-*****)

i Writing configuration info to firebase.json...
i Writing project information to .firebaserc...

✔ Firebase initialization complete!

如果有人帮助我,我真的很高兴。
提前致谢。

最佳答案

您必须使用箭头键和空格键选择要初始化的功能-默认情况下未启用任何功能。请在粘贴的日志中查看错误消息:

⚠  You have have not selected any features. Continuing will simply associate this folder with a Firebase project. Press Ctrl + C if you want to start over.

您还可以运行 firebase init functions专门初始化函数。

关于firebase - 'Firebase init'命令未创建package.json,index.js和function文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46610479/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com