-
Notifications
You must be signed in to change notification settings - Fork 179
Cannot read property 'exclude' of undefined #190
Comments
The { options:
{ target: 2,
module: 5,
moduleResolution: 2,
sourceMap: true,
emitDecoratorMetadata: true,
experimentalDecorators: true,
removeComments: false,
noImplicitAny: false },
fileNames: [ 'files' ],
errors: [] } It lacks the expected typingOptions: typingOptions: { enableAutoDiscovery: false, include: [], exclude: [] }, Haven't found the cause for this issue yet. |
Had the same issue, upgrading to TypeScript 1.8.10 helped |
please i am having this same issue and typescript is 2.0.2. please i need a fix as soon as possible. |
Yeah, I'm having this issue also on 2.0.2 and the very latest dev-version. |
Same issue with tsc => Version 2.0.10 |
Guys you need to do an npm cache clean, npm install and npm install -g angular-cli while you run as admin Worked for me |
Thanks! Its working |
awesome-typescript-loader/src/instance.ts Line 266 in bd5cbb5
|
Having the same problem with latest Typescript |
Yep, this is breaking with Typescript 2.1.4. |
using version |
Based on what kvey is saying, a temporary solution is to open node_modules/awesome-typescript-loader/dist/instance.js and comment out the offending line. |
Installing [email protected] as suggested by @sumitarora fixed it for me. So is this an awesome-typescript-loader bug, a tsconfig change that needs to take place, or a typescript bug? |
It should be an awesome-typescript-loader bug (or just incompatibility with > typescript 2.0, where the key typingOptions was changed) but the resolution for it is already available in whatever release is next (because the issue isn't in the current master). |
Everythink is working with TypeScript Version 2.0.10 but when you upgrade your TypeScript Version to 2.1.4 the above error shows up. There are some changes that are not working with the Loader |
Yup, getting same here just now. :( |
Here too. :( |
Here too |
Same here, downgrading to typescript 2.0.10 fixed the issue |
Got this error today as well |
Using Typescript 2.1.1 also "fixes" this issue. |
still having issues with both 2.0 and 2.1.1 |
This error appeared after upgrading to TypeScript 2.1.4 (from 2.0.10) and downgrading back to 2.0.10 does not fix issue. Switched to ts-loader until things are settled. |
@VorgaT1339 Have you cleared our node_modules folder and reinstalled all your dependencies? Then it should work again. |
This morning our builds are failing because
installs 2.1.4 now. Nailing it down to |
Changing "typescript": "^2.1.1", to "typescript": "2.1.1", worked. |
Mine worked by changing
to
made it load the typescript module which doesn't break the awesome-typescript-loader module |
Its fixed with "typescript": "^2.1.4" and "awesome-typescript-loader": "^3.0.0-beta.9" |
Edit: [Wrong solution] This code is resolving the issue; I don't want to create MR, so please apply, test it and close it soon. |
that code appears to have a couple of issues. If that's the exclude from tsconfig.json, that is semantically different from a not specified exclude. (exclude in the default typescript implementation excludes node_modules, bower_componenets etc by default.) irrespective of that. the compilerOptions node should be of type ts.CompilerOptions, which doesn't contain an exclude. if we are asking for exclude of compilerConfig.raw.compilerOptions, then that is just systemic of another bug. Based on my previous reading of the code, @s-panferov seems to have a couple of places where he convolutes CompilerOptions and LoaderConfig. Its actually a problem in the loader plugin because it makes it so you can't specify many of the loader options because they conflict with compilerConfig. All in all, if the above line fixes it, it doesn't seem like the right fix. |
I haven't analysed this code so deeply, so you are probably right. My intention was to make quick-fix only. |
Creating a fix based on s-panferov#190 I have not tested this fix, I'm contributing it for evaluation
fair enough @sdudziak If you're up for it, this looks like it needs a pretty substantial go through/rewrite for webpack2 I'm still deciding if I'm going to work on that, or just see about improving performance in ts-loader. at-loader has been way useful, but its not in good shape with the new APIs from both webpack 2 and typescript 2. Thanks for tossing in your quick fix, I submitted a PR with a hack comment that refs this issue to help us remember to remove it later |
Yup, downgrading to 2.0.10 worked. |
@KristiyanVachev Same, that also worked for me. Thanks! |
I've had this same issue but found I could use Typescript 2.1.4 with the latest, beta, version of atl, The only issue I had then was that it seems that the webpack entry points are now case sensitive (on windows at least). |
Installing [email protected] and awesome-typescript-loader@¨2.2.4 as suggested by @sumitarora fixed it for me too. |
+1 This failed for me
This worked: guess it had to be the exact version
|
version 2.2.4 doesnt work with latest typescript version s-panferov/awesome-typescript-loader#190 upgrade to latest version which seems to be an beta version
version 2.2.4 doesnt work with latest typescript version s-panferov/awesome-typescript-loader#190 upgrade to latest version which seems to be an beta version
modifying my typescript package.json reference to a specific version fixed it for me. Thanks for the help. Wil likely upgrade to recent version of typescript once this issue is fixed with awesome-typescript loader. "typescript": "=2.0.10" |
At the time of writing, this problem still persists. The fix above still works, though.
|
Still no support for Typescript 2.2.1? Guess it's time to switch back to ts-loader. |
@szahn what a silly thing to say. If it's that much of an issue, feel free to submit a PR. |
|
The full error:
The line of code where the error occurs (here) seems like the first point where
compilerConfig
is used.So it seems like atl is unable to find or read my
tsconfig.json
file, it is however at the root and contains nothing out of the ordinary:The text was updated successfully, but these errors were encountered: