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
Actual Behaviour:
When I try and compile with the file structure above, I get the following error
ERROR in ./utils/eventEmitter.ts
(1,25): error TS2307: Cannot find module 'events'.
However, if I move ./@types/events/index.d.ts to ./node_modules/@types/events/index.d.ts everything works as expected and the eventEmitter will compile
Expected behaviour:
Using the above configuration I would expect the compiler to pick up on my custom definitions which are in ./@types in the same way it does when the same definitions are in the node_modules/@types folder
The text was updated successfully, but these errors were encountered:
This looks like #11137. it should be fixed in the next release. for now to work around this issue, you will need to add a path mapping entry to tell the compiler to look in the @types override folder as such:
TypeScript Version: 2.0.3 from npm
Code
I've got the following project structure setup
In my tsconfig.json I have:
in eventEmitter.js I have the following:
Actual Behaviour:
When I try and compile with the file structure above, I get the following error
However, if I move
./@types/events/index.d.ts
to./node_modules/@types/events/index.d.ts
everything works as expected and the eventEmitter will compileExpected behaviour:
Using the above configuration I would expect the compiler to pick up on my custom definitions which are in
./@types
in the same way it does when the same definitions are in thenode_modules/@types
folderThe text was updated successfully, but these errors were encountered: