Error in ionic build --prod. Ngc can't resolve module(resolve)


#1

Hello!

I am trying to run test application and I use n2g-validation@3.9.1.
I am trying to run ionic build android --prod but I have this error message:

[15:51:30]  ngc started ...
can't resolve module ./base64 from D:/test-app/node_modules/ng2-validation/dist/index.d.ts
[15:51:35]  build prod failed: Cannot read property 'Base64Validator' of undefined, resolving symbol CustomFormsModule 
            in D:/test-app/node_modules/ng2-validation/dist/index.d.ts, resolving symbol CustomFormsModule in 
            D:/test-app/node_modules/ng2-validation/dist/index.d.ts 
[15:51:35]  ionic-app-script task: "build" 
[15:51:35]  Error: Cannot read property 'Base64Validator' of undefined, resolving symbol CustomFormsModule in 
            D:/test-app/node_modules/ng2-validation/dist/index.d.ts, resolving symbol CustomFormsModule in 
            D:/test-app/node_modules/ng2-validation/dist/index.d.ts 
Error: Cannot read property 'Base64Validator' of undefined, resolving symbol CustomFormsModule in D:/test-app/node_modules/ng2-validation/dist/index.d.ts, resolving symbol CustomFormsModule in D:/test-app/node_modules/ng2-validation/dist/index.d.ts
    at simplifyInContext (D:\test-app\node_modules\@angular\compiler-cli\src\static_reflector.js:475:23)
    at StaticReflector.simplify (D:\test-app\node_modules\@angular\compiler-cli\src\static_reflector.js:478:22)
    at StaticReflector.annotations (D:\test-app\node_modules\@angular\compiler-cli\src\static_reflector.js:60:36)
    at NgModuleResolver.resolve (D:\test-app\node_modules\@angular\compiler\bundles\compiler.umd.js:14261:46)
    at CompileMetadataResolver._loadNgModuleMetadata (D:\test-app\node_modules\@angular\compiler\bundles\compiler.umd.js:14646:45)
    at CompileMetadataResolver.getUnloadedNgModuleMetadata (D:\test-app\node_modules\@angular\compiler\bundles\compiler.umd.js:14636:23)
    at addNgModule (D:\test-app\node_modules\@angular\compiler\bundles\compiler.umd.js:12944:43)
    at D:\test-app\node_modules\@angular\compiler\bundles\compiler.umd.js:12957:16
    at Array.forEach (native)
    at _createNgModules (D:\test-app\node_modules\@angular\compiler\bundles\compiler.umd.js:12956:28)

My info:

ordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.3
Xcode version: Not installed

Maybe someone had a similar problem?


#2

I apologize.

My fault. Downgrade version of the module and it works.