Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ivy compiler issues #50

@aosi87

Description

@aosi87

I was trying to use this plugin with NS7 and angular 10, i was able to install every other dependency but this one.

Looks like everything works if we do not use Angular Ivy compiler

I've created ngcc.config.ts

module.exports = {
    "packages": {
        "nativescript-masked-text-field": {
            entryPoints: {
                "angular": {
                    override: {
                        main: "./index.js",
                        typings: "./index.d.ts",
                    },
                    ignoreMissingDependencies: true,
                }
            },
            ignorableDeepImportMatchers: [
                /tns-core-modules\//,
                /@nativescript\/core\//,
                /@nativescript\/angular\//,
                /nativescript-angular\//,
                /nativescript-angular\/forms\//,
                /@angular\/core\//,
                /@angular\/forms\//,
            ]
        }
    }
}

Add added a post-install script in package.json
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"

ERROR

ERROR in node_modules/nativescript-masked-text-field/angular/index.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of ClaimsModule, but could not be resolved to an NgModule class.

This likely means that the library (nativescript-masked-text-field/angular) which declares MaskedTextFieldModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

1 export declare class MaskedTextFieldModule

But still cannot make it work. Do you have any plans to update this plugin to work with NS7 and Angular9+

NOTE: i cannot use @proplugins/nativescript-masked-text-field 'cause requries a subscription that my team cannot use or do right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ★ProPlugins★Available in the ProPlugins version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions