Making your Angular 2 library statically analyzable for AoT
Isaac Mann

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’”

Any ideas?

Many thanks for your answer!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.