After RC0 upgrade the xml2js import failed :
npm install xml2js --save
npm install @types/xml2js --save --save-exact
the code :
import xml2js from "xml2js";
@Injectable()
export class XMLDataService {
constructor() {
console.log(xml2js)
}
}
ionic serve log me that no names are provided for module stream, string_decoder, events, timer…
[10:22:42] bundle dev started ...
[10:22:48] rollup: Treating 'stream' as external dependency
preferring built-in module 'string_decoder' over local alternative at '[...]\node_modules\string_decoder\index.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
[10:22:48] rollup: Treating 'string_decoder' as external dependency
preferring built-in module 'string_decoder' over local alternative at '[...]\node_modules\string_decoder\index.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
[10:22:48] rollup: Treating 'events' as external dependency
[10:22:49] rollup: Treating 'timers' as external dependency
[10:22:53] rollup: No name was provided for external module 'stream' in options.globals - guessing 'stream'
[10:22:53] rollup: No name was provided for external module 'string_decoder' in options.globals - guessing 'string_decoder'
[10:22:53] rollup: No name was provided for external module 'events' in options.globals - guessing 'events'
[10:22:53] rollup: No name was provided for external module 'timers' in options.globals - guessing 'timers'
[10:22:55] bundle dev finished in 12.79 s
and so on chrome :
What am I doing wrong?