nativescript-masked-text-field
nativescript-masked-text-field copied to clipboard
[Build Error] Module not found: Can't resolve
There are three different directories that are not being resolved in masked-text-field-common.js
ERROR in ./node_modules/nativescript-masked-text-field/masked-text-field-common.js 6:13-36
Module not found: Error: Can't resolve 'ui/core/view' in '/Users/jwhitley/myhighland-app/node_modules/nativescript-masked-text-field'
@ ./node_modules/nativescript-masked-text-field/masked-text-field.ios.js 7:33-70 8:9-46
@ ./src/main.js 10:10-67
ERROR in ./node_modules/nativescript-masked-text-field/masked-text-field-common.js 7:19-43
Module not found: Error: Can't resolve 'ui/text-field' in '/Users/jwhitley/myhighland-app/node_modules/nativescript-masked-text-field'
@ ./node_modules/nativescript-masked-text-field/masked-text-field.ios.js 7:33-70 8:9-46
@ ./src/main.js 10:10-67
ERROR in ./node_modules/nativescript-masked-text-field/masked-text-field.ios.js 6:18-41
Module not found: Error: Can't resolve 'ui/text-base' in '/Users/jwhitley/myhighland-app/node_modules/nativescript-masked-text-field'
@ ./src/main.js 10:10-67
Usage:
<template>
<Page>
<MaskedTextField :text="formData.phone" @textChange="" mask="999.999.999-99" keyboardType="phone"/>
</Page>
</template>
<script>
import MaskedTextField from 'nativescript-masked-text-field';
export default {
components: {MaskedTextField}
}
Hey @jarrodwhitley , per the readme:
This repo only supports NativeScript pre-6.0. The latest version of the plugin supporting NS 6+ is availble as part of ProPlugins.
You are probably using the plugin with a more recent version of the NS runtime and core modules, and that's why it does not work. You will have to either migrate to the ProPlugins version or you can pull the code from this repo and make the plugin compatible.
Sorry I missed that.