Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: PRO 4.3.7 Circular dependency – Modals, Accordian, Toast

Don Irwin pro asked 7 years ago


Downloaded PRO 4.3.7 tonight - using  angular/cli@1.4.7 and typescript@2.2.2 - warnings generated on

ng serve
Circular dependency detected:
 srcapptypescriptsfreemodalsmodal.service.ts ->
 srcapptypescriptsfreemodalsmodalContainer.component.ts ->
 srcapptypescriptsfreemodalsmodal.service.ts
Circular dependency detected:
 srcapptypescriptsfreemodalsmodalContainer.component.ts ->
 srcapptypescriptsfreemodalsmodal.service.ts ->
 srcapptypescriptsfreemodalsmodalContainer.component.ts
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
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
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
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

sashjuan pro answered 7 years ago


I wasn't getting the Circular Dependencies errors until: I had an issue using Lazy Loading for Modules due to the fact that Lazy Loading is only available to Webpack 2.4.x but  Webpack 2.3.2 is a dependency for npm-submodules@0.5.2. This causes Angular CLI to throw a "Profile is null" error because there are multiple webpack versions being used. I Upgraded to npm-submodules@0.8.3 and now Angular CLI works with Lazy Loading  but I'm getting the Circular Dependencies errors.

Hello I’ve got problem with Circular dependency in free/modals. WARNING in Circular dependency detected: ..typescriptsfreemodalsmodal.service.ts -> ..typescriptsfreemodalsmodalContainer.component.ts -> ..typescriptsfreemodalsmodal.service.ts WARNING in Circular dependency detected: ..typescriptsfreemodalsmodalContainer.component.ts -> ..typescriptsfreemodalsmodal.service.ts -> ..typescriptsfreemodalsmodalContainer.component.ts I totally dont know how to fix that warning.

Dawid Adach pro commented 7 years ago

Dear Mateusz, we are working on that, we will come back with solution as soon as possible.

Don Irwin pro answered 7 years ago


removing

import { ToastService } from ‘./typescripts/pro;

from app.component.ts fixed this for me


Don Irwin pro answered 7 years ago


I haven't altered anything in package.json - simply unziped mdb-angular-pro-4.3.7.zip ran npm installand ng serve

C:GitHub\xxx>ng --version
 Your global Angular CLI version (1.4.7) is greater than your local
 version (1.2.6). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
 _ _ ____ _ ___
 / _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
 / △ | '_ / _` | | | | |/ _` | '__| | | | | | |
 / ___ | | | | (_| | |_| | | (_| | | | |___| |___ | |
 /_/ __| |_|__, |__,_|_|__,_|_| ____|_____|___|
 |___/
 @angular/cli: 1.2.6
 node: 8.1.1
 os: win32 x64
 @angular/animations: 4.3.6
 @angular/common: 4.3.6
 @angular/compiler: 4.3.6
 @angular/core: 4.3.6
 @angular/forms: 4.3.6
 @angular/http: 4.3.6
 @angular/platform-browser: 4.3.6
 @angular/platform-browser-dynamic: 4.3.6
 @angular/router: 4.3.6
 @angular/cli: 1.2.6
 @angular/compiler-cli: 4.4.5

and package.json:

{
  "name": "quickstart-angular2",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "build:free": "ngm build -p src/app/typescripts/free --clean && gulp npmFree && gulp startFree && gulp onlyFree",
    "build:pro": "ngm build -p src/app/typescripts/pro --clean && gulp only-pro && gulp startPro",
    "build:all": "npm run build:free && npm run build:pro",
    "aot:build": "ng build --prod --sm=false --aot=true --output-path=dist",
    "pre-commit": "ng lint"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "~1.0.0-beta.0",
    "@angular/animations": "4.3.x ||^2.0.0",
    "@angular/common": "4.3.x ||^2.0.0",
    "@angular/compiler": "~4.3.3 ||^2.0.0",
    "@angular/core": "4.3.x ||^2.0.0",
    "@angular/forms": "4.3.x ||^2.0.0",
    "@angular/http": "4.3.x ||^2.0.0",
    "@angular/platform-browser": "4.3.x ||^2.0.0",
    "@angular/platform-browser-dynamic": "4.3.x ||^2.0.0",
    "@angular/router": "4.3.x ||^2.0.0",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.30",
    "angular-bootstrap-md": "*",
    "chart.js": "2.5.x",
    "classlist.js": "1.1.x",
    "core-js": "2.4.x",
    "del": "3.0.x",
    "easy-pie-chart": "2.1.x",
    "font-awesome": "4.7.x",
    "gulp": "^3.9.1",
    "gulp-rename": "1.2.x",
    "gulp-run": "1.7.x",
    "hammerjs": "2.0.x",
    "ng-html-util": "1.0.x",
    "ngm-cli": "0.5.x",
    "rxjs": "5.3.x",
    "screenfull": "3.3.x",
    "smoothscroll-polyfill": "0.3.x",
    "web-animations-js": "2.3.x",
    "zone.js": "0.8.x"
  },
  "devDependencies": {
    "@angular/cli": "1.2.6",
    "@angular/compiler-cli": "^4.0.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.85",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.2.0"
  }
}

Dawid Adach pro commented 7 years ago

Dear Don, does the same happen when you install lib via npm?

Dawid Adach pro answered 7 years ago


Dear Nori, I cannot reproduce your issue, could you send me your package at d.adach@mdbootstrap.com ?  
MacBook-Pro-Dawid:ngpro Dawid$ ng --version 

    _                      _                 ____ _     ___

   /    _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

  / △  | '_  / _` | | | | |/ _` | '__|   | |   | |    | |

 / ___ | | | | (_| | |_| | | (_| | |      | |___| |___ | |

/_/   __| |_|__, |__,_|_|__,_|_|       ____|_____|___|

               |___/

@angular/cli: 1.4.7

node: 6.11.3

os: darwin x64

@angular/animations: 4.4.3

@angular/common: 4.4.3

@angular/compiler: 4.4.3

@angular/core: 4.4.3

@angular/forms: 4.4.3

@angular/http: 4.4.3

@angular/platform-browser: 4.4.3

@angular/platform-browser-dynamic: 4.4.3

@angular/router: 4.4.3

@angular/cli: 1.4.7

@angular/compiler-cli: 4.4.3

@angular/language-service: 4.4.3

typescript: 2.3.4

MacBook-Pro-Dawid:ngpro Dawid$ ng serve 

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2017-10-13T12:57:07.858Z                                                          

Hash: d9e01fa8af53da17ae80

Time: 44413ms

chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]

chunk {main} main.bundle.js, main.bundle.js.map (main) 11.1 kB {vendor} [initial] [rendered]

chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 217 kB {inline} [initial] [rendered]

chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 781 kB {inline} [initial] [rendered]

chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.14 MB [initial] [rendered]

webpack: Compiled successfully.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

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