0
プロジェクトでは、タイプが定義されていない第三者のライブラリが使用されています。プロジェクトがAngular CLI(バージョン1.0.0-beta.29)を使用して開発されているので、ライブラリはtypings.d.tsで宣言されています。私の場合: 'xml2js-es6-promise'モジュールを宣言してください。ngc型指定されていない第三者のライブラリを使用しているプロジェクトをコンパイルしていません
プロジェクトはコンパイルされ、tscで正常に処理されますが、ngcでは正常に処理されません。 エラートレース:
Cannot find module ‘xml2js-es6-promise’
tscconfig:
{
“compilerOptions”: {
“baseUrl”: “.”,
“declaration”: true,
“stripInternal”: true,
“experimentalDecorators”: true,
“strictNullChecks”: false,
“noImplicitAny”: false,
“module”: “es2015”,
“moduleResolution”: “node”,
“paths”: {
“@angular/core”: [“node_modules/@angular/core”],
“rxjs/*”: [“node_modules/rxjs/*”],
“xml2js-es6-promise”:[“node_modules/xml2js-es6-promise”]
},
“rootDir”: “.”,
“outDir”: “dist”,
“sourceMap”: true,
“inlineSources”: true,
“target”: “es5”,
“skipLibCheck”: true,
“lib”: [
“es2015”,
“dom”
]
},
“files”: [
“index.ts”
],
“angularCompilerOptions”: {
“strictMetadataEmit”: true
}
}