These are chat archives for AngularClass/angular2-webpack-starter

13th
Apr 2017
Amer Ghalayini
@singetak
Apr 13 2017 10:09
hi! i want to enable the strictNullChecks however when i do so, i get errors at the node_modules
Ritwik Banerjee
@ritwbanerjee
Apr 13 2017 10:09
whats your code like?
can you gimme an example
Amer Ghalayini
@singetak
Apr 13 2017 10:11
i just ran the template i get errors node_modules/@angular/form, i have no added code
Ritwik Banerjee
@ritwbanerjee
Apr 13 2017 10:11
what template
Amer Ghalayini
@singetak
Apr 13 2017 10:12
angular2-webpack-starter
i just cloned angular2-webpack-starter and ran it, but enabled strictNullChecks
Amer Ghalayini
@singetak
Apr 13 2017 10:17
i believe i shouldn't get errors in the node_modules, cause i have it in the exclude in the configuration. so i need to figure out why the exclude not working
Ritwik Banerjee
@ritwbanerjee
Apr 13 2017 10:19
and what does the error say?
Amer Ghalayini
@singetak
Apr 13 2017 10:19
node_modules/@angular/core/src/util/decorators.d.ts:11:5
TS2411: Property 'extends' of type 'Type<any> | undefined' is not assignable to string index type 'Function | any[] | Type<any>'.
node_modules/@angular/forms/src/model.d.ts:378:27
TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; emitModelToViewChange?: boolea...' has no property 'onlySelf' and no string index signature.
Ritwik Banerjee
@ritwbanerjee
Apr 13 2017 10:20
with strictNullChecks - you cannot have type as any
Amer Ghalayini
@singetak
Apr 13 2017 10:20
i know
but this a library in node_modules
so the problem in my code is that the tsconfig is not excluding node_modules folder when applying the configuration
Ritwik Banerjee
@ritwbanerjee
Apr 13 2017 10:23
did you try exclude: [path.resolve(__dirname, '../node_modules’)]
in webpack
Amer Ghalayini
@singetak
Apr 13 2017 10:24
aha will try it thanks
Ritwik Banerjee
@ritwbanerjee
Apr 13 2017 10:24
np :-)
Amer Ghalayini
@singetak
Apr 13 2017 14:49
@ritwbanerjee i have tried what you suggested, didn't work for me. At the end i added "skipDefaultLibCheck": true,
"skipLibCheck": true, to the tsconfig.webpack.json