0

I have the following error suddenly happens

Typescript Error
Duplicate identifier 'Map'.
/node_modules/@types/googlemaps/index.d.ts

Tried this way but it wasnt fixed

ionic 2 Duplicate identifier 'export='

my tsconfig file looks like below

{
  "compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "sourceMap": true,
    "noUnusedParameters": false,
    "lib": [
      "dom",
      "es2015"
    ]
  },
  "types": [
    "jasmine"
  ],
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  },
  "awesomeTypescriptLoaderOptions": {
    "forkChecker": true,
    "useWebpackText": true
  }
}

ionic -v 3.2.0

Ananth
  • 87
  • 1
  • 13

1 Answers1

0

Check the section on @types, typeRoots and types in tsconfig.json docs.

Because you have included

"types": [
  "jasmine"
],

Typescript will only pick jasmine type declarations. You should add googlemaps to the array as well.

"types": [
      "jasmine",
      "googlemaps
    ],

Or remove the types array from tsconfig.json as typescript is configured to look at @types from node_modules by default.

Check this answer for further information.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103