Angular2: Duplicate identifier and can not find module

116 Views Asked by At

My angular project was working fine, when im including new ts file and copy and pasted file content from other project im getting duplicate identifier under modules name in the import statement and can not file module

1

There are 1 best solutions below

0
pd farhad On

You can add a "filesGlob" entry in your tsconfig.json file to exclude unnecessary files. For example :

"filesGlob": [
    "./src/**/*.ts",
    "./test/**/*.ts",
    "!./node_modules/**/*.ts",
    "typings/browser.d.ts"
  ]

!means you are excluding the node_modules. Let me know if it works. Or you have to update questions with more details