Closed
Description
c:\test>tree /f
│ package.json
│
├───node_modules
│ └───@types
│ └───node
│
└───src
index.ts
tsconfig.json
c:\test>cd src
c:\test\src>type index.ts
import * as fs from "fs";
c:\test\src>npm install @types/node
test@1.0.0 c:\test
`-- @types/node@6.0.38
c:\test\src>tsc
index.ts(1,21): error TS2307: Cannot find module 'fs'.
The issue here is that we only including node_modules in the current folder for automatic type discovery. this causes a lot of confusion for users trying to use the new @types
package, specially if they are global. ppl do not usually associate the location of their tsconfig.json with it not working, all they see is that sometimes it does and sometimes it does not.