-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange error throw: "ERROR TypeError: defaults$2 is not a constructor" #832
Comments
Hi, this seems hard to reproduce. Can you compare your steps with the app provided in the demo on stack blitz or the one in the repo? |
I just compared both package.json and app.module from StackBlitz and it looks the be the same. app.module:
package.json:
Possible of note is that I'm using the latest version of Angular (although I had the same error in 5.2 which prompted the upgrade to v6), and the StackBlitz example is in v5. I should also be able to provide any other outputs/code files that might be useful? |
I have the same issue. To reproduce add: "target"="es6" to the tsconfig.app.json |
if you are targeting browsers, do use es5 |
Thanks @alexxtaurus , although I seem to have had target=es5 already:
and tsconfig.app.json
|
I can see target": "es6" in your config |
@Gbuomprisco True, I also changed it to es5 and still got the same error. |
Hello, this project is a simple copy but without the problem, works for me on "@angular/core": "6.1.10". |
Finally tracked whatever the source issue was to an incompatible configuration in tsconfig.json. For reference, in case anyone else experiences the same error, this is my complete tsconfig.json file. **Note ** although I upgraded to Angular 7 and ngx-chips 2.0.0.beta0, the only fix was the below:
|
having same error after upgrading to angular 8, chips version is - "ngx-chips": "^2.0.0-beta.0", resolved issue with this - |
I am also having the same issue after Upgrading Angular 8, "target": "es5", doesnt solve the issue in my case. |
Same problem here. |
I also have the same issue after upgrading to Angular 8 |
Changing to |
Fixes TypeError "defaults$2 is not a constructor" Calling the function directly instead of with `new` (which doesn't work in ES6 mode) returns the exact same structure in both modes. Closes Gbuomprisco#832 Closes Gbuomprisco#744 Closes Gbuomprisco#634
PLEASE MAKE SURE THAT:
I'm submitting a ... (check one with "x")
Current behavior
I have tried all the following
However I get the following error every time:
With line 1458 looking like:
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
The text was updated successfully, but these errors were encountered: