React 工程编译出错提示错误:Duplicate identifier 'LibraryManagedAttributes'.的修改方法

 

 

 

 

 

现象:

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"],
}

  



posted @ 2020-06-09 08:48  奥兰王子  阅读(2353)  评论(0编辑  收藏  举报