App Module unable to resolve angular2-text-mask

This is a problem with angular2-text-mask “1.0.1” in Ionic 2 RC0

In dev mode, I got this error:

bundle dev failed: Module /root/path/node_modules/angular2-text-mask/dist/angular2TextMask.js does not export TextMaskModule (imported by /root/path/src/app/app.module.ts)

So I fixed this overriding rollup.config.js

    namedExports: {
        'node_modules/angular2-text-mask/dist/angular2TextMask.js': ['TextMaskModule']

But I have a problem when trying to build it. So in prod mode:

ngc: Error: Unexpected value 'TextMaskModule' imported by the module 'AppModule'

My app.module code

import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { TextMaskModule } from 'angular2-text-mask';
import { MyApp } from './app.component';

    imports: [
    declarations: []
export class AppModule {}

Any help would be greatly appreciated.

1 Like

i’m having the same issue

This is an issue that doesn’t have a clear solution yet, so I think it’s a matter of time until Ionic or Rollup can solve it.

1 Like

yes, probably, let’s wait for some hint