Próbuję teraz utworzyć samouczek dla mojego Google Home, ale miałem pewne problemy. Zgodnie z this tutorial, zakończyłem następujące kroki realizacji Build.Komenda "Firebase init" nie utworzyła pliku package.json, index.js i folderu funkcji
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
Ale po kroku 7, było tylko „firebase.json” w bieżącym folderze, więc nie mogłem Patrz Funkcje folderu, package.json i index.js.
Mój log konsoli jest poniżej.
$ 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!
Cieszę się, że ktoś mi pomoże. Z góry dzięki.
Czy jesteś absolutnie pewien, że wybrałeś "funkcje"? Powinno to brzmieć "Setup funkcji", a następnie "Katalog funkcji zostanie utworzony w projekcie z wstępnie skonfigurowanym pakietem Node.js . Funkcje mogą być wdrażane przy wdrażaniu firebase." To działa dla mnie. –
Witaj Doug. Po przeczytaniu Twojego komentarza odkryłem, że nie naciskałem tylko spacji. A teraz działa. Dziękuję bardzo za radę. – popo