0

My server .ts files are complaining of not finding the modules and the typings, though I installed the modules and checked the node_modules.

This is my project structure: screenshot

The errors I get : screenshot

The tsconfig.json :

{
    "compilerOptions": {
        "module": "commonjs",
        "moduleResolution": "node",
        "target": "es5",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "noImplicitAny": false
    },
    "exclude": [
        "node_modules",
    "typings"
    ],
    "filesGlob": [
    "**/*.ts",
    "typings/main",
    "./typings/index.d.ts"
    ]
}
Mark Spencer
  • 81
  • 1
  • 6

1 Answers1

0

filesGlob are not yet supported in native typescript (github)

My suggestion would be to remove filesGlob section as it looks like you do not actually need it, and instead:

{ 
    "compilerOptions": {
        "module": "commonjs",
        "moduleResolution": "node",
        "target": "es5",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "noImplicitAny": false
    },
    "exclude": [
        "node_modules",
        "typings/browser.d.ts",
        "typings/browser/**"
    ]
} 

Hope this helps.

Amid
  • 21,508
  • 5
  • 57
  • 54