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

Can't deploy with Firebase #103

Open
jdgamble555 opened this issue Mar 4, 2024 · 2 comments
Open

Can't deploy with Firebase #103

jdgamble555 opened this issue Mar 4, 2024 · 2 comments

Comments

@jdgamble555
Copy link

jdgamble555 commented Mar 4, 2024

Describe the bug
If I add Firebase to my project, it will not deploy.

To Reproduce
Steps to reproduce the behavior:

  1. Create a test project in Angular. Deploy it.
  2. Add firebase ng add @angular/fire
  3. Try to redeploy

Expected behavior
It should deploy without problems.

Versions

  • Angular.js: 17.2
  • plugin (if installed in your package.json at fixed version): using GitHub to connect

Error:

There was an error when loading the "crypto" npm module. Support for npm modules in edge functions
 is an experimental feature. Refer to https://ntl.fyi/edge-functions-npm for more information.

I know Firebase works, because I have deployed the exact same project to netlify edge using SvelteKit and Analog (which uses Angular):

So there should be a way to get it to work.

J

@Skn0tt
Copy link
Contributor

Skn0tt commented Mar 4, 2024

Hey Jonathan! Running ng add firebase gives me the error package does not support schematics. Could you provide a reproduction repository?

@jdgamble555
Copy link
Author

Sorry, ng add @angular/fire.

https://github.com/jdgamble555/angular-firebase-deploy

If I comment out these lines:

    importProvidersFrom(
      provideFirebaseApp(() => initializeApp()),
      provideAuth(() => getAuth()),
      provideFirestore(() => getFirestore())
    )

No problem, but you can see I have it working in Analog:

https://github.com/jdgamble555/analog-firebase/blob/master/src/app/app.config.ts

J

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