You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project tries to compile a index.ts which imports @types/node. Internally @types/node has http module. TS then assumes that http module is http.ts in the current project and compiles it. I think that is incorrect behavior.
It is strange that a file in node_modules can control which files get compiled in my project. I think that once trace resolution enters node_module it should not be allowed to escape out of it.
The text was updated successfully, but these errors were encountered:
the issue is the baseUrl set to the current folder. this makes the compiler defaults to searching there. regardless i agree that resolving an import from "node_modules" should not result in a local file. we need to think of a way to avoid this.
TypeScript Version: Version 2.1.0-dev.20160826
Code
https://github.com/mhevery/ts-resolution-bug
Expected behavior:
Actual behavior:
The project tries to compile a
index.ts
which imports@types/node
. Internally@types/node
hashttp
module. TS then assumes thathttp
module ishttp.ts
in the current project and compiles it. I think that is incorrect behavior.It is strange that a file in
node_modules
can control which files get compiled in my project. I think that once trace resolution enters node_module it should not be allowed to escape out of it.The text was updated successfully, but these errors were encountered: