The problem is that ‘xml2js-es6-promise’ has no type definition. I’ve tried it:
npm install -D @types/xml2js-es6-promise with the following result:
‘@types/xml2js-es6-promise’ is not in the npm registry.
On previous Angular CLI documentation said that when you have no typed source you must declare it on typings.d.ts in the follow way:
declare module ‘xml2js-es6-promise’;
And then you’re able to work with this not typed third party library.
As I said It works properly when compiling with tsc but no with ngc. The error that ngc throws is:
“Error Cannot find type definition file for ‘xml2js-es6-promise’”
Many thanks for your answer!