I 스타터로서 사용하고 angular/universal-starter 타이프 2오류 TS2300 : 식별자 중복 '수출 ='
웹팩 2. I을 사용하여 패키지를 bluebird
및 nodemailer
첨가. 이러한 패키지 및 관련 typings 추가 한 후 :
"@types/bluebird": "3.0.31",
"@types/nodemailer": "1.3.30",
그것을 나에게 터미널에서이 오류를 제공합니다
ERROR /프로젝트/node_modules/@ 유형/nodemailer/node_modules/@ 유형/블루 버드/index.d.ts (772,5) : 오류 TS2300 : 중복 식별자 '내보내기 ='.
오류 /project/node_modules/@types/bluebird/index.d.ts (772,1) : 오류 TS2300 : 중복 식별자 'export ='.
nodemailer, @ 유형/nodemailer 오래된 블루 버드 typings 버전 2.0.0입니다 @ 타입/블루 버드 (를 포함하여 자신의 node_modules 폴더가/유형 @를 설치 한 후 주 [그것이 도움이 확실하지 여부]를) :
내 tsconfig.json 파일 :
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"module": "commonjs",
"removeComments": true,
"sourceMap": true,
"lib": ["es6", "dom"]
},
"include": [
"node_modules/@types/**/*.d.ts",
"src/**/*.ts"
],
"exclude": [
"node_modules",
"!node_modules/@types/**/*.d.ts"
],
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
,
어떻게이 오류를 해결할 수 있습니까? 감사합니다
최근에 jquery와 동일한 오류 메시지가 표시되었고 tsconfig.json의 typeRoots를 추가하여 해결했습니다. [Minko Gechev의 블로그] (http://blog.mgechev.com/2016/03/28/ambient-type-definitions-duplicate-identifier-typescript-fix/)에서 더 많은 정보를 얻을 수 있습니다. – Will