Typescript (Error: Can not find type definition file for 'globals')

0

I created a Typescript project following a tutorial and this error occurred and I do not know how to solve it. My project is structured as follows:

  • project
    • scripts
      • tsconfig.json
      • typings.json
      • typings
      • test
    {
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": false,
        "removeComments": false,
        "preserveConstEnums": true,
        "sourceMap": false,
        "typeRoots" : ["./typings"], 
        "lib" : ["es2015", "es2015.iterable", "dom"]
    }
    ,
    "include": [
        "../**/*.ts"
    ],
    "exclude": [
        "node_modules",
        "**/*.spec.ts"
    ]
    }
    

Below the file ts-config.json:  

{
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": false,
        "removeComments": false,
        "preserveConstEnums": true,
        "sourceMap": false,
        "typeRoots" : ["./typings"], 
        "lib" : ["es2015", "es2015.iterable", "dom"]
    }
    ,
    "include": [
        "..//.ts"
    ],
    "exclude": [
        "node_modules",
        "/.spec.ts"
    ]
}

Below the typings.json file:  

{
  "globalDependencies": {
    "mocha": "registry:dt/mocha#2.2.5+20170311011848"
  },
  "dependencies": {
    "chai": "registry:npm/chai#3.5.0+20160723033700"
  }
}

    
asked by anonymous 19.05.2018 / 23:07

0 answers