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

Angular build error using firebase, when importing firebase/auth/cordova #5878

Closed
jpike88 opened this issue Jan 11, 2022 · 6 comments · Fixed by #5904
Closed

Angular build error using firebase, when importing firebase/auth/cordova #5878

jpike88 opened this issue Jan 11, 2022 · 6 comments · Fixed by #5904

Comments

@jpike88
Copy link

jpike88 commented Jan 11, 2022

READ THIS: DOWNGRADING TO @firebase/[email protected] fixed the problem.

Operating System version: macOS 10.15.2

in my package.json:

    "@firebase/auth": "^0.19.5",

./src/components/app/login/login.component.ts:18:0-108 - Error: Module not found: Error: Package path ./cordova is not exported from package /Users/me/project/node_modules/@firebase/auth (see exports field in /Users/me/project/node_modules/@firebase/auth/package.json)

Import code:

import {
	getRedirectResult,
	signInWithRedirect,
	getAuth,
	GoogleAuthProvider,
} from '@firebase/auth/cordova';
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@jpike88 jpike88 changed the title Angular build error using firebase import Angular build error using firebase, when importing firebase/auth/cordova Jan 11, 2022
@HaoboZ
Copy link

HaoboZ commented Jan 11, 2022

I got the same issue, but downgrading it to 0.17.1 didn't help

@sam-gc
Copy link
Contributor

sam-gc commented Jan 13, 2022

Please try importing from firebase/auth/cordova (i.e. omitting the @). The packages are meant to be imported this way; the @ packages are for internal use in the SDK

@jpike88
Copy link
Author

jpike88 commented Jan 19, 2022

Cannot find module 'firebase/auth/cordova' or its corresponding type declarations.ts(2307)

@jpike88
Copy link
Author

jpike88 commented Jan 19, 2022

Oh wow I just realized. So you guys use the publicly available @firebase namespace... for internal SDK usage?

@jpike88
Copy link
Author

jpike88 commented Jan 19, 2022

The problem persists in latest firebase package:


./src/components/app/login/login.component.ts:402:23-30 - Error: export 'getAuth' (imported as 'getAuth') was not found in 'firebase/auth/cordova' (module has no exports)

./src/components/app/login/login.component.ts:403:31-49 - Error: export 'GoogleAuthProvider' (imported as 'GoogleAuthProvider') was not found in 'firebase/auth/cordova' (module has no exports)

./src/components/app/login/login.component.ts:406:18-36 - Error: export 'signInWithRedirect' (imported as 'signInWithRedirect') was not found in 'firebase/auth/cordova' (module has no exports)

./src/components/app/login/login.component.ts:412:31-48 - Error: export 'getRedirectResult' (imported as 'getRedirectResult') was not found in 'firebase/auth/cordova' (module has no exports)

./src/components/app/login/login.component.ts:413:29-68 - Error: export 'GoogleAuthProvider' (imported as 'GoogleAuthProvider') was not found in 'firebase/auth/cordova' (module has no exports)

./node_modules/firebase/auth/cordova/dist/index.esm.js:1:0-39 - Error: Module not found: Error: Package path ./cordova is not exported from package /Users/joshua/Projects/aquipa/client/node_modules/@firebase/auth (see exports field in /Users/joshua/Projects/aquipa/client/node_modules/@firebase/auth/package.json)

@firebase firebase locked and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants