Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

The loader doesn't find type definitions #232

Open
Tragetaschen opened this issue Sep 7, 2016 · 7 comments
Open

The loader doesn't find type definitions #232

Tragetaschen opened this issue Sep 7, 2016 · 7 comments

Comments

@Tragetaschen
Copy link

I'm running 2.2.4 and awesome-typescript-loader shows errors that types declared in tsconfig.json could not be found.

> .\node_modules\.bin\tsc -p .\Client\
> webpack
Hash: 2b746f8b21a9bb27c2ea
Version: webpack 2.1.0-beta.21
Time: 1193ms
  Asset    Size  Chunks             Chunk Names
main.js  260 kB       0  [emitted]  main
    + 2 hidden modules

ERROR in [default]
Cannot find type definition file for 'bootstrap'.

ERROR in [default]
Cannot find type definition file for 'jquery'.

ERROR in [default] C:\Users\kairu\Source\Repos\awesome-typescript-loader-types-issue\Client\src\main.ts:3:14
Property 'tooltip' does not exist on type 'JQuery'.
@Tragetaschen
Copy link
Author

@MikaAK
Copy link

MikaAK commented Sep 8, 2016

I'm running into the same issue when using lib: ['es6', 'dom'] where I get

'node_modules/typescript/lib/lib.es2015.generator.d.ts' not found

@Ballrock
Copy link

Ballrock commented Sep 20, 2016

Same here but with Angular2.
After some tests, in my case it seems to work when I don't use "?tsconfig" parameter of awesome-typescript-loader.

@sky-coding
Copy link

Confirmed on 2.2.4, attempting to use ?tsconfig parameter causes Cannot find type definition file for '<type>', this is really unfortunate because I need multiple tsconfig files.

@sky-coding
Copy link

Without changing anything else, replacing awesome-typescript-loader?tsconfig=<fileName> with ts-loader?configFileName=<fileName> (using ts-loader@0.9.4) fully resolves this problem and otherwise functions properly. It may not be as awesome but it does support named/multiple tsconfig files. Could we get a bug label on this please?

@vidartf
Copy link

vidartf commented Nov 15, 2016

As I found out recently in #252, try using awesome-typescript-loader?configFileName=<fileName> ?

@Tragetaschen
Copy link
Author

#252 (comment) mentions a workaround for this issue, which is declaring typeRoots in the tsconfig.json. This works in my project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants