wishtack / wishtack-steroids

Frontend on Steroids: Reactive Component Loader, RxJS Scavenger...
https://wishtack.io
MIT License
96 stars 16 forks source link

NullInjectorError: No provider for InjectionToken ComponentInjector! #187

Open kmanev073 opened 5 years ago

kmanev073 commented 5 years ago

Hi!

Today I updated most of my npm packages and it seems there is some problem. Everything compiles successfully but when I open my browser I get this error in my console:

ERROR NullInjectorError: StaticInjectorError(AppModule)[DynamicDirective -> InjectionToken ComponentInjector]: 
  StaticInjectorError(Platform: core)[DynamicDirective -> InjectionToken ComponentInjector]: 
    NullInjectorError: No provider for InjectionToken ComponentInjector!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (http://localhost:31337/vendor.js:16123:25)
    at resolveToken (http://localhost:31337/vendor.js:27315:24)
    at tryResolveToken (http://localhost:31337/vendor.js:27259:16)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:31337/vendor.js:27161:20)
    at resolveToken (http://localhost:31337/vendor.js:27315:24)
    at tryResolveToken (http://localhost:31337/vendor.js:27259:16)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:31337/vendor.js:27161:20)
    at resolveNgModuleDep (http://localhost:31337/vendor.js:35631:29)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (http://localhost:31337/vendor.js:36302:16)
    at resolveDep (http://localhost:31337/vendor.js:36673:45)

This is my package.json:

{
  "name": "WebApp",
  "version": "1.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --configuration=bg",
    "build": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build",
    "build:ssr": "npm run build -- --app=ssr --output-hashing=media",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^8.2.7",
    "@angular/common": "^8.2.7",
    "@angular/compiler": "^8.2.7",
    "@angular/core": "^8.2.7",
    "@angular/forms": "^8.2.7",
    "@angular/http": "^7.2.15",
    "@angular/platform-browser": "^8.2.7",
    "@angular/platform-browser-dynamic": "^8.2.7",
    "@angular/platform-server": "^8.2.7",
    "@angular/router": "^8.2.7",
    "@fortawesome/fontawesome-free": "^5.11.1",
    "@ng-bootstrap/ng-bootstrap": "^5.1.1",
    "@ngrx/effects": "^8.3.0",
    "@ngrx/store": "^8.3.0",
    "@ngrx/store-devtools": "^8.3.0",
    "@nguniversal/module-map-ngfactory-loader": "^8.1.1",
    "@progress/kendo-angular-buttons": "^5.0.0",
    "@progress/kendo-angular-common": "^1.1.0",
    "@progress/kendo-angular-dateinputs": "^4.1.0",
    "@progress/kendo-angular-dialog": "^4.1.0",
    "@progress/kendo-angular-dropdowns": "^4.1.0",
    "@progress/kendo-angular-excel-export": "^3.0.1",
    "@progress/kendo-angular-grid": "^4.3.0",
    "@progress/kendo-angular-inputs": "^6.2.0",
    "@progress/kendo-angular-intl": "^2.0.0",
    "@progress/kendo-angular-l10n": "^2.0.0",
    "@progress/kendo-angular-layout": "^4.1.0",
    "@progress/kendo-angular-menu": "^2.0.0",
    "@progress/kendo-angular-pdf-export": "^2.0.0",
    "@progress/kendo-angular-popup": "^3.0.1",
    "@progress/kendo-angular-scrollview": "latest",
    "@progress/kendo-angular-tooltip": "^2.1.0",
    "@progress/kendo-angular-treeview": "^4.0.1",
    "@progress/kendo-angular-upload": "^5.1.0",
    "@progress/kendo-data-query": "^1.5.2",
    "@progress/kendo-drawing": "^1.2.0",
    "@progress/kendo-schematics": "latest",
    "@progress/kendo-theme-default": "^4.3.2",
    "@progress/kendo-ui": "^2019.3.917",
    "@progress/telerik-angular-report-viewer": "^8.19.918",
    "@types/lodash": "^4.14.138",
    "@wishtack/reactive-component-loader": "^1.0.0",
    "@wishtack/rx-scavenger": "^1.0.5",
    "ajv": "^6.10.2",
    "apollo-angular": "^1.7.0",
    "apollo-angular-link-http": "^1.8.0",
    "apollo-cache-inmemory": "^1.6.3",
    "apollo-client": "^2.6.4",
    "apollo-link": "^1.2.13",
    "apollo-link-context": "^1.0.19",
    "apollo-link-ws": "^1.0.19",
    "apollo-utilities": "^1.3.2",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^4.3.1",
    "core-js": "^3.2.1",
    "graphql": "^14.5.6",
    "graphql-tag": "^2.10.1",
    "jasny-bootstrap": "4.0.0",
    "jquery": "^3.4.1",
    "lodash": "^4.17.15",
    "ng-dynamic-component": "^5.0.0",
    "ngx-viewer": "^1.0.5",
    "perfect-scrollbar": "^1.4.0",
    "popper.js": "^1.15.0",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^6.5.3",
    "rxjs-compat": "^6.5.3",
    "subscriptions-transport-ws": "^0.9.16",
    "viewerjs": "^1.3.6",
    "web-animations-js": "^2.3.2",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.5",
    "@angular/cli": "^8.3.5",
    "@angular/compiler-cli": "^8.2.7",
    "@angular/language-service": "^8.2.7",
    "@types/bootstrap": "^4.3.1",
    "@types/chartist": "^0.9.46",
    "@types/jasmine": "^3.4.0",
    "@types/jasminewd2": "^2.0.6",
    "@types/jquery": "^3.3.31",
    "@types/node": "^12.7.5",
    "codelyzer": "^5.1.1",
    "jasmine-core": "^3.4.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^4.3.0",
    "karma-chrome-launcher": "^3.1.0",
    "karma-cli": "2.0.0",
    "karma-coverage-istanbul-reporter": "^2.1.0",
    "karma-jasmine": "^2.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "protractor": "^5.4.2",
    "ts-node": "^8.4.1",
    "tslint": "^5.20.0",
    "typescript": "^3.5.3"
  },
  "optionalDependencies": {
    "node-sass": "^4.12.0"
  }
}

I would be grateful if you could help me identify and solve the problem.

yjaaidi commented 5 years ago

Hi @kmanev073, could you please share a reproduction on Stackblitz or a github repo? Thank you in advance.

kmanev073 commented 5 years ago

@yjaaidi that was some time ago but I'll try to reproduce it. I just ended up downgrading the npm packages.