angular-runtime icon indicating copy to clipboard operation
angular-runtime copied to clipboard

Can't deploy with Firebase

Open jdgamble555 opened this issue 1 year ago • 2 comments

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):

  • https://analog-firebase.netlify.app/
  • https://sveltekit-firebase-deploy.netlify.app/

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

J

jdgamble555 avatar Mar 04 '24 13:03 jdgamble555

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

Skn0tt avatar Mar 04 '24 13:03 Skn0tt

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

jdgamble555 avatar Mar 04 '24 13:03 jdgamble555

This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 7 days if no further activity occurs. Thanks!

github-actions[bot] avatar Mar 05 '25 02:03 github-actions[bot]

This issue was closed because it had no activity for over 1 year.

github-actions[bot] avatar Mar 12 '25 02:03 github-actions[bot]