Strange error throw: "ERROR TypeError: defaults$2 is not a constructor"
See original GitHub issuePLEASE MAKE SURE THAT:
- you searched similar issues online (9/10 issues in this repo are solved by googling, so please…do it)
- you provide an online demo I can see without having to replicate your environment
- you help me by debugging your issue, and if you can’t, do go on filling out this form
I’m submitting a … (check one with “x”)
[x ] bug report => search github for a similar issue or PR before submitting
[ ] support request/question
Notice: feature requests will be ignored, submit a PR if you'd like
Current behavior I have tried all the following
- Followed the installation instructions for current version (1.9.8) and the previous version (1.9.7)
- Upgraded from Angular 5.2 to 6.1.9
- Deleted node_modules and reinstalled from scratch
However I get the following error every time:
ERROR TypeError: defaults$2 is not a constructor
at new TagInputComponent (ngx-chips.js:1458)
at createClass (core.js:11729)
at createDirectiveInstance (core.js:11559)
at createViewNodes (core.js:13100)
at createEmbeddedView (core.js:12959)
at callWithDebugContext (core.js:14460)
at Object.debugCreateEmbeddedView [as createEmbeddedView] (core.js:13740)
at TemplateRef_.createEmbeddedView (core.js:11064)
at ViewContainerRef_.createEmbeddedView (core.js:10845)
at NgIf._updateView (common.js:3878)
With line 1458 looking like:
this.separatorKeys = new defaults$2().separatorKeys;
Expected behavior I would expect no error and the component to render. My assumption is either a version clash or I am not initialising the library properly.
Minimal reproduction of the problem with instructions (if applicable)
What do you use to build your app?. Please specify the version Angular CLI, output from np --version
Angular CLI: 6.2.5 Node: 10.11.0 OS: win32 x64 Angular: 6.1.9 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.8.5 @angular-devkit/build-angular 0.8.5 @angular-devkit/build-optimizer 0.8.5 @angular-devkit/build-webpack 0.8.5 @angular-devkit/core 0.8.4 @angular-devkit/schematics 0.8.5 @angular/cdk 6.4.7 @angular/cli 6.2.5 @angular/material 6.4.7 @ngtools/webpack 6.2.5 @schematics/angular 0.8.5 @schematics/update 0.8.5 rxjs 6.3.3 typescript 2.9.2 webpack 4.20.2
Angular version: 6.1.9
ngx-chips version: 1.9.8 and 1.9.7
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Latest version of Chrome
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (3 by maintainers)
I am also having the same issue after Upgrading Angular 8, “target”: “es5”, doesnt solve the issue in my case.
having same error after upgrading to angular 8, chips version is - “ngx-chips”: “^2.0.0-beta.0”, resolved issue with this -
"target": "es5",