Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/example/README.md doesn't mention creating an app first #162

Open
waded opened this issue Jan 12, 2022 · 2 comments
Open

/example/README.md doesn't mention creating an app first #162

waded opened this issue Jan 12, 2022 · 2 comments

Comments

@waded
Copy link

waded commented Jan 12, 2022

I followed example README.md exactly, and result was the example didn't work, with a runtime JS error:

Uncaught TypeError: Cannot read properties of undefined (reading 'sdkConfig')
    at Object.<anonymous> (App.jsx:10:58)

Cause of the above is npm run build produced firebase-config.json that contained an error (with misleading message, firebase/firebase-tools/issues/4007) because I hadn't created a "web" app yet in the Firebase project.

The readme, since it has readers create a new Firebase project, should include a firebase apps:create invocation, to ensure there's a web app available. Could also mention using firebase apps:list, in case the Firebase project is not new, already has 2 apps, which I presume causes the same error(?) - I can imagine people trying to use most of these steps with an existing project.

@Molnfront
Copy link

Open your Terminal and be in your example folder and enter firebase use --add. Then you can select any of your firebase projects.

@Molnfront
Copy link

But still it will not work. I got the same error:

Uncaught TypeError: Cannot read properties of undefined (reading 'sdkConfig')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants