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

Fix modular autoinit breakage #6663

Closed
wants to merge 4 commits into from
Closed

Fix modular autoinit breakage #6663

wants to merge 4 commits into from

Conversation

bcspragu
Copy link

@bcspragu bcspragu commented Oct 7, 2022

I ran into this issue updating dependencies for a Nuxt 3 app. The problem is that process.{client,server,dev} are defined even on the client, so the client ends up broken with errors like:

Uncaught TypeError: can't access property "__FIREBASE_DEFAULTS__", process.env is undefined

Since the code only uses process.env, this updates the check to look explicitly for process.env.

Fixes #6662

I ran into this issue updating dependencies for a Nuxt 3 app. The problem is that `process.{client,server,dev}` are defined even on the client, so the client ends up broken with errors like:

```
Uncaught TypeError: can't access property "__FIREBASE_DEFAULTS__", process.env is undefined
```

Since the code only uses `process.env`, this updates the check to look explicitly for `process.env`.
@changeset-bot
Copy link

changeset-bot bot commented Oct 7, 2022

⚠️ No Changeset found

Latest commit: 57b7f53

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hsubox76
Copy link
Contributor

hsubox76 commented Oct 7, 2022

Thank you! Can you add a changeset for @firebase/util? Patch should be fine.

@bcspragu
Copy link
Author

bcspragu commented Oct 7, 2022

Should be all set, updated @firebase/util to 1.7.1

@hsubox76
Copy link
Contributor

hsubox76 commented Oct 7, 2022

Thanks! Just fyi, we use changesets so instead of altering the package.json directly, you'd need to follow the directions in the "No Changeset Found" comment above.

But it turns out I also have to make other fixes in that file due to #6660 so I can just put this fix in the same PR so we won't run into any merge conflicts or anything and you don't have to worry about the changeset tool.

@hsubox76
Copy link
Contributor

hsubox76 commented Oct 7, 2022

Rolling this fix into #6665

@bcspragu
Copy link
Author

bcspragu commented Oct 7, 2022

Sounds good to me, and sorry for glossing over the (very clearly laid out) instructions!

@bcspragu bcspragu closed this by deleting the head repository Oct 23, 2022
@firebase firebase locked and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught TypeError: can't access property "__FIREBASE_DEFAULTS__", process.env is undefined
2 participants