Closed kdcllc closed 8 years ago
can you run the compiler with --listFiles, and let us know what file is missed. we will need some more information to be able to diagnose the issue.
@mhegazy I ran the following c:\Dev_angular\Angular-TypeScript-Starter>tsc gulpfile.ts --listFiles --module commonjs gulpfile.ts(1,23): error TS2307: Cannot find module 'gulp'. tools/utils/application.ts(1,20): error TS2307: Cannot find module 'yargs'. C:/Users/Admin/AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts tools/utils/application.ts tools/config.ts gulpfile.ts
Command line does not produces the same results at all. When I use ts-node the gulp command runs with the fixes that I implemented. Thanks, kdcllc
@mhegazy Please close this issue. As I have stated in the original message the compiler read thru .d.ts files in order to load definition files. There at two ways to handle the loading of the types:
Thanks
I discovered the problem that TypeScript compiler recognizes the custom typing within the Visual Studio Code but when you attempt to compile it is not able to find the module.
I have custom typing in the following location:
Here is my tsconfig.json
I was able to solve the issue by adding custom.d.ts file in the same directory and add reference to my file definition then compiler recognized the type definition. Here is the link to the project that works: https://github.com/kdcllc/Angular-TypeScript-Starter/tree/typescript-workflow-with-gulp