Topic: MDB & Angular 4 – second attempt (circular warning)

rl pro asked 6 years ago


I still believe that MDB is a good choice for a new project, but:

node v6.9.5, npm 4.1.2, ng/cli 1.2.4

- downloaded mdb-angular-free-4.3.0.zip, extracted to \mdb dir
- in .angular-cli.json changed line "../node_modules/angular-bootstrap-md/scss/mdb.scss" to "../scss/mdb.scss"
- in \mdb\scss\mdb.scss changed @import "./angular/mdb-angular-free"; to @import "angular/mdb-angular";
- no other changes to any other files
- "npm i" from \mdb
- ng serve -o => app running at http://localhost:4200, great!!
- ng build --prod => failure.

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\dev\mdb\src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts

Any reason?


rl pro commented 6 years ago

Update: I updated local cli to latest version (npm i @angular/cli@latest --save) and: - "ng build --prod" works, even "ng build --prod --aot" works - "ng server -o" serves, but a circular warning appeared: WARNING in Circular dependency detected: src\app\typescripts\free\modals\modal.service.ts -> src\app\typescripts\free\modals\modalContainer.component.ts -> src\app\typescripts\free\modals\modal.service.ts WARNING in Circular dependency detected: src\app\typescripts\free\modals\modalContainer.component.ts -> src\app\typescripts\free\modals\modal.service.ts -> src\app\typescripts\free\modals\modalContainer.component.ts

Rafał Rogulski free answered 6 years ago


Hi, Warning showing because introduced several changes to new angular-cli. They will not cost any problem when you compile your app. Regards

nm_patrick pro commented 6 years ago

Is this something that will be updated to the warnings disappear?

Rafał Rogulski free commented 6 years ago

We must be waiting for the angular-cli team to fix it.

riccy pro answered 6 years ago


i have the same problem after updating to 4.3.0. ng build does not work, ng serve does not work too.

WARNING in Circular dependency detected:
src\app\typescripts\free\modals\modal.service.ts -> src\app\typescripts\free\modals\modalContainer.component.ts -> src\app\typescripts\free\modals\modal.service.ts

WARNING in Circular dependency detected:
src\app\typescripts\free\modals\modalContainer.component.ts -> src\app\typescripts\free\modals\modal.service.ts -> src\app\typescripts\free\modals\modalContainer.component.ts

WARNING in Circular dependency detected:
src\app\typescripts\pro\accordion\components\sb-item.ts -> src\app\typescripts\pro\accordion\components\squeezebox.ts -> src\app\typescripts\pro\accordion\components\sb-item.ts

WARNING in Circular dependency detected:
src\app\typescripts\pro\accordion\components\squeezebox.ts -> src\app\typescripts\pro\accordion\components\sb-item.ts -> src\app\typescripts\pro\accordion\components\squeezebox.ts

WARNING in Circular dependency detected:
src\app\typescripts\pro\alerts\toast\toast.component.ts -> src\app\typescripts\pro\alerts\toast\toast.service.ts -> src\app\typescripts\pro\alerts\toast\toast.component.ts

WARNING in Circular dependency detected:
src\app\typescripts\pro\alerts\toast\toast.service.ts -> src\app\typescripts\pro\alerts\toast\toast.component.ts -> src\app\typescripts\pro\alerts\toast\toast.service.ts


Rafał Rogulski free commented 6 years ago

Hi, Can you send my your project without node_modules on my email: r.rogulski@mdbootstrap.com? I can't reproduce this warning on my pack that's why I ask you.

riccy pro commented 6 years ago

i've send you an email.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags