rangle-starter icon indicating copy to clipboard operation
rangle-starter copied to clipboard

(Angular2/Typescript) TypeError: Cannot read property 'exclude' of undefined

Open jphustman opened this issue 9 years ago • 19 comments

ERROR in ./src/main.ts Module build failed: TypeError: Cannot read property 'exclude' of undefined at applyDefaults (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/instance.ts:266:72) at Object.ensureInstance (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/instance.ts:145:5) at compiler (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/index.ts:37:20) at Object.loader (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/index.ts:18:18) @ multi app

ERROR in ./src/vendor.ts Module build failed: TypeError: Cannot read property 'exclude' of undefined at applyDefaults (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/instance.ts:266:72) at Object.ensureInstance (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/instance.ts:145:5) at compiler (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/index.ts:37:20) at Object.loader (/var/www/clients/client5/web7/home/kmeservejphustman/Desktop/testing/node_modules/awesome-typescript-loader/src/index.ts:18:18) @ multi vendor

I think it has something to do with the Typescript version?

jphustman avatar Dec 13 '16 05:12 jphustman

i see the same problem

qinlinxin2080 avatar Dec 13 '16 11:12 qinlinxin2080

Yes, we need to update to the latest typescript; there are some breaking changes. In the mean time you can pin your ts version to 2.0

SethDavenport avatar Dec 13 '16 13:12 SethDavenport

@winkervswbecks @bennett000: I can try to get on this on Friday unless sup sq has time before then?

SethDavenport avatar Dec 13 '16 13:12 SethDavenport

Yup I simply removed the ^ in the typescript dependency in package.json.

jphustman avatar Dec 14 '16 03:12 jphustman

Any issues with switching to the awesome-typescript-loader 3.0.0-beta version instead?

jamesbs avatar Dec 14 '16 18:12 jamesbs

i see the same problem

jackytse avatar Dec 21 '16 02:12 jackytse

image

Please help me to resolve this issue

fahadhussain2 avatar Jan 03 '17 13:01 fahadhussain2

@jamesbs go ahead if that fixes it.

SethDavenport avatar Jan 03 '17 13:01 SethDavenport

@SethDavenport do u have any idea how to resolve this error?

fahadhussain2 avatar Jan 04 '17 19:01 fahadhussain2

Pinned typescript to 2.0.10. This should be fixed now.

SethDavenport avatar Jan 06 '17 20:01 SethDavenport

how to pinned typescript to 2.0.10 ? @SethDavenport

fahadhussain2 avatar Jan 09 '17 07:01 fahadhussain2

@faradhussain2 go in your package.json and change the typescript version from ^2.0.3 to 2.0.10 (remember to remove the ^). Then do an npm install

SethDavenport avatar Jan 09 '17 13:01 SethDavenport

removed the error .... thank you so much @SethDavenport for your help

fahadhussain2 avatar Jan 09 '17 17:01 fahadhussain2

image

i found this error in "ng serve" after installing ngmaterial 2 Please help me with this error

fahadhussain2 avatar Jan 26 '17 09:01 fahadhussain2

downgrading typescript from 2.1.1 to 2.0.0 remove the error thrown by awesome-typescript-loader. On the other hand, jasmine used on the system throws an error and prompt to upgrade the typescript version. Trapped in loop. Need an immediate solution for it.

dilagurung avatar Jan 30 '17 11:01 dilagurung

still the same error :/

nicraMarcin avatar May 31 '17 20:05 nicraMarcin

Does anyone know the problem with this error?

didacpr avatar Jul 09 '17 00:07 didacpr

@AndresCL did you get the solution ?

Arafullahi avatar Sep 17 '17 05:09 Arafullahi

I am also getting the same error. any idea on how to fix it.

lounceny2016 avatar Mar 23 '20 21:03 lounceny2016