question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add @angular/fire?

See original GitHub issue

I’m stuck in installing ‘ng add XXX’ for example, https://github.com/angular/angularfire

The add command requires to be run in an Angular project, but a project definition could not be found.

NX recoomends to use NX-CLI not Angular CLI for working with other frameworks.

Okay…then What should I do to use ‘ng add’ Material, Firebase and so on… Most of top library packages only support “ng add” schematics way recently… Of course, there are ways to manually install but they started to get rid of manual install documentation because of ‘ng add’ popularity.

so, NX CLI should support ‘nx add’ because there is no angular.cli but workspace.json,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
samudiogocommented, Dec 25, 2020

Hi folks, I will take the angular material as an example of how to deal with ng add in NX workspace:

Add @angular/material using yarn or npm:

yarn add @angular/material

Now, let’s take the advantage of nx list @angular/material. This fabulous command shows us all possibility of usage of @angular/material: image now let’s add in our angular project:

nx g @angular/material:ng-add

That’s all folks! Simple as that!

9reactions
hadrien-tomacommented, May 17, 2021

Thank you @samudiogo, it works on my side, additionnaly, here is the associated help (of course, it is possible to specify the project):

yarn run nx generate @angular/material:ng-add --help
yarn run v1.21.1
$ nx generate @angular/material:ng-add --help

nx generate @angular/material:ng-add [options,...]

Options:
  --project               Name of the project.
  --theme                 The theme to apply (default: indigo-pink)
  --typography            Whether to set up global typography styles.
  --animations            Whether Angular browser animations should be set up. (default: true)
  --dryRun                Runs through and reports activity without writing to disk.
  --skip-nx-cache         Skip the use of Nx cache.
  --help                  Show available options for project target.
  
Done in 1.34s.
Read more comments on GitHub >

github_iconTop Results From Across the Web

angular/fire - npm
The official Angular library for Firebase. ... Start using @angular/fire in your project by running `npm i ... ng add @angular/fire.
Read more >
How to Setup Firebase for Angular - Coding Latte
After that, we are going to install @angular/fire using Angular Schematics – @angular/fire is the new name of angularfire2 . ... The above...
Read more >
How to Setup Firebase Account, AngularFire2 in Angular 13
Visit Firebase website and login using your email id.Add Project section. Click on the below screen. ... Enter the project name, don't forget...
Read more >
ng add @angular/fire "The package that you are trying to add ...
You can try using a different version of the package or contact the package author to add ng-add support. Using npm uninstall @angular/fire...
Read more >
Firebase + Angular: Setup and Auth - Induro
The login component that checks if the user is logged in with AngularFire and if not gives them the ability to login via...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found