现象:
Failed to compile.
(2818,14): Duplicate identifier 'LibraryManagedAttributes'.
Duplicate identifier问题的解决
修改方法:
1. 找到tsconfig.json文件
解决方案是在tsconfig.json的compilerOption中加入下面两项:
"skipLibCheck": true,
"allowSyntheticDefaultImports": true
12
完整例子:
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"rootDir": "src",
"sourceMap": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true
},
"include": ["src"],
"exclude": ["node_modules", ".vscode-test"],
}