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

  




免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM