-
Notifications
You must be signed in to change notification settings - Fork 178
Cannot find typings with typescript@beta and @type #196
Comments
@sanex3339 it seems that you're using |
@sanex3339 your case compiles on OSX, so please describe your env. |
@sanex3339 confirmed that it works on windows too |
I tried moving my project from using typings to @types from npm today, but found that niether ATL or ts-loader is picking up the @types files. My project compiles fine using typescript 2.0, but throws type errors when loading using webpack. also tried loading the TsConfigPathsPlugin. Is there some setting I need to enable for this? |
Also using I have installed
My
I get these errors:
If I explicitly add the ref, it works fine This leads me to believe it's a problem with loading |
I experimented a bit more and found that explicitly using the
|
Yeah, I found the same...adding to 'types' fixes AWL errors but I agree it shouldn't be necessary. |
@filipesilva, @jefbarn why do you think it should not be necessary? |
yes, becouse @mhegazy said so:
|
Ah, I see, it's supposed that directories from |
@s-panferov I expected ATL to follow the same behavior as |
Additionally, tsc 2.0 will also search @types folder in node_modules without adding anything to typeRoots. I couldn't find this documented anywhere, but you can see it if you use --traceResolution with tsc. |
ping |
It might also help to note that not only do you need to install with npm @types/express but you also need to do it with npm express for the .js files. I assumed the first command would also take care of .js being able to recognize the express framework through @types but now I know you must also install with npm install express --save. |
Have tested with Great job @s-panferov! |
This loader has same problem as
ts-loader
aftertypescript-2.0.0-beta
update.Possible solution by @mhegazy:
original issue DefinitelyTyped/DefinitelyTyped#10113
original problem:
After installing @types/node i got multiple errors:
I add all definitions to
types
But as said https://github.com/mhegazy in DefinitelyTyped/DefinitelyTyped#10113 (comment)
2.0.0-beta compiler.
project: https://github.com/sanex3339/javascript-obfuscator/tree/dev
project tsconfig:
entry point
to reproduce you must clone
dev
branch, and runnode_modules/.bin/webpack --watch
The text was updated successfully, but these errors were encountered: