angular-safeguard icon indicating copy to clipboard operation
angular-safeguard copied to clipboard

Angular 9 production build errors for type without a generic type argument

Open sittingbool opened this issue 4 years ago • 3 comments

  1. Add LockerModule to AppModel using withConfig
  2. Run ng serve - all good
  3. Run ng serve --prod getting error as follows:

ERROR in node_modules/angular-safeguard/dist/Locker.module.d.ts:4:51 - error NG6005: LockerModule.withConfig returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

4 static withConfig(userConfig: ILockerConfig): ModuleWithProviders;

sittingbool avatar May 29 '20 06:05 sittingbool

Sorry this somehow wasn't seen in my issue list, I'll fix this up on the weekend unless you wouldn't mind making a PR @sittingbool !

MikaAK avatar Jul 21 '20 21:07 MikaAK

hi!! got same error image

image

"dependencies": { "@angular/animations": "~10.0.0", "@angular/common": "~10.0.0", "@angular/core": "~10.0.0", "@angular/fire": "6.0.3", "@angular/forms": "~10.0.0", "@angular/platform-browser": "~10.0.0", "@angular/platform-browser-dynamic": "~10.0.0", "@angular/router": "~10.0.0", "@capacitor/android": "^2.4.2", "@capacitor/core": "2.4.2", "@capacitor/ios": "^2.4.2", "@ionic-native/base64": "^5.23.0", "@ionic-native/core": "^5.0.0", "@ionic-native/file": "^5.23.0", "@ionic-native/file-chooser": "^5.23.0", "@ionic-native/file-opener": "^5.23.0", "@ionic-native/file-path": "^5.23.0", "@ionic-native/file-transfer": "^5.23.0", "@ionic-native/firebase": "5.29.0", "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/launch-navigator": "^5.24.0", "@ionic/angular": "^5.0.0", "@types/stripe-checkout": "^1.0.3", "angular-safeguard": "^2.1.0", "animate.css": "^3.7.2", "apollo-angular": "^1.8.0", "apollo-angular-link-http": "^1.9.0", "apollo-cache-inmemory": "^1.6.0", "apollo-client": "^2.6.0", "apollo-link": "^1.2.11", "aws-amplify": "^1.1.22", "aws-amplify-angular": "^3.0.3", "firebase": "^7.24.0", "graphql": "^14.5.0", "graphql-tag": "^2.10.0", "moment": "^2.24.0", "moment-timezone": "^0.5.27", "ng-lazyload-image": "^9.0.1", "ngx-image-compress": "^8.0.4", "rxjs": "~6.5.5", "tslib": "^2.0.0", "zone.js": "~0.10.3" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1000.0", "@angular/cli": "~10.0.5", "@angular/compiler": "~10.0.0", "@angular/compiler-cli": "~10.0.0", "@angular/language-service": "~10.0.0", "@capacitor/cli": "2.4.2", "@ionic/angular-toolkit": "^2.3.0", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "@types/stripe-v3": "^3.1.14", "codelyzer": "^6.0.0", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.9.5" },

rodrigorellana avatar Oct 21 '20 19:10 rodrigorellana

Hello @MikaAK @sittingbool

Hope you are doing well.

With Angular 13, With Node JS v14.23.1, It's forcibly expecting the GenericType to be provided wth ModuleWithProviders.

I see that the following Commits are pushed.

95114ab41420fd31b49939d1058e49de96678fdc 280e1ee7d022747df799514af9139ac04443480c c38f43a611bb496ed1dd04f41c85dc142db35340

Could you please expedite to Release a New Version with the Necessary Changes. It would be highly appreciated.

Thanks in advance.

sshanmu91 avatar Mar 25 '23 16:03 sshanmu91