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.

Missing dependencies when running ng build --prod

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows 10

Versions

Angular CLI: 9.0.2
Node: 12.15.0
OS: win32 x64

Angular: 9.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.2
@angular-devkit/build-angular      0.900.2
@angular-devkit/build-ng-packagr   0.900.2
@angular-devkit/build-optimizer    0.900.2
@angular-devkit/build-webpack      0.900.2
@angular-devkit/core               9.0.2
@angular-devkit/schematics         9.0.2
@angular/cdk                       9.0.0
@angular/cli                       9.0.2
@angular/fire                      5.4.2
@angular/flex-layout               9.0.0-beta.29
@angular/material                  9.0.0
@ngtools/webpack                   9.0.2
@schematics/angular                9.0.2
@schematics/update                 0.900.2
ng-packagr                         9.0.0
rxjs                               6.5.4
typescript                         3.7.5
webpack                            4.41.2

Repro steps

  1. Create a new Angular library (I use nx to do this) 2.) Run ng build my-library --prod. See that build succeeds 3.) Add all dependencies and ngx-auth-firebaseui to project 4.) Import NgxAuthFirebaseUIModule.forRoot(…) as docs states
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

// Import your library
import { NgxAuthFirebaseUIModule } from 'ngx-auth-firebaseui';

@NgModule({
  imports: [CommonModule,
    // Specify the ngx-auth-firebaseui library as an import
    NgxAuthFirebaseUIModule.forRoot({
      apiKey: 'your-firebase-apiKey',
      authDomain: 'your-firebase-authDomain',
      databaseURL: 'your-firebase-databaseURL',
      projectId: 'your-firebase-projectId',
      storageBucket: 'your-firebase-storageBucket',
      messagingSenderId: 'your-firebase-messagingSenderId'
    }, undefined, {})
  ]
})
export class TestModule {}

5.) Run build command again ng build my-library --prod and see all the errors:

The log given by the failure

Compiling TypeScript sources through ngc
Warning: Can't resolve all parameters for LoggedInGuard in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], 
[object Object], ?). This will become an error in Angular v6.x
ERROR: Can't resolve all parameters for LoggedInGuard in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], [object Object], ?).
Can't resolve all parameters for UserComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], ?, ?, [object Object]).
Can't resolve all parameters for AuthComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], [object Object], [object Object], ?, [object Object], [object Object], [object Object]).
Can't resolve all parameters for AuthProvidersComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: (?).
Can't resolve all parameters for ɵi in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: (?, [object Object], [object Object]).Can't resolve all parameters for NgxAuthFirebaseuiLoginComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object 
Object], ?, [object Object]).
Can't resolve all parameters for NgxAuthFirebaseuiRegisterComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], [object Object], ?).

An unhandled exception occurred: Can't resolve all parameters for LoggedInGuard in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], [object Object], ?).
Can't resolve all parameters for UserComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], ?, ?, [object Object]).
Can't resolve all parameters for AuthComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], [object Object], [object Object], ?, [object Object], [object Object], [object Object]).
Can't resolve all parameters for AuthProvidersComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: (?).
Can't resolve all parameters for ɵi in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: (?, [object Object], [object Object]).Can't resolve all parameters for NgxAuthFirebaseuiLoginComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object 
Object], ?, [object Object]).
Can't resolve all parameters for NgxAuthFirebaseuiRegisterComponent in C:/Projects/SOLID/SOLID.Core/node_modules/ngx-auth-firebaseui/ngx-auth-firebaseui.d.ts: ([object Object], [object Object], ?).

See "C:\Users\micha\AppData\Local\Temp\ng-ejs5TF\angular-errors.log" for further details.

Desired functionality

ng build will work with NgxAuthFirebaseUIModule

Mention any other details that might be useful

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tiloiocommented, Mar 25, 2020

I found the problem and created a pull request. @AnthonyNahas could you review and merge it?

0reactions
tiloiocommented, Mar 25, 2020

I tried it to change the ModuleWithProviders according to https://angular.io/guide/deprecations#modulewithproviders-type-without-a-generic but it didn’t helped. I can’t find a reason…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 - The target entry-point has missing dependencies
I had The target entry-point has missing dependencies error when starting my Angular project with npm run ...
Read more >
Deployment - Angular
On the first terminal, run the ng build command in watch mode to compile the application to the dist folder. content_copy ng build...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
Error while running the project after installing mdbootstrap
The configuration looks good, it looks like your project dependencies were not installed properly. Please try to delete the node_modules folder and package-lock ......
Read more >
New Project in Angular 12 build --prod error
... cd app-name; npm run start. The project is tarting correctly. But If I want to compile it with command : ng build...
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