vue-masked-input icon indicating copy to clipboard operation
vue-masked-input copied to clipboard

Cannot import from node_modules in a Vue 2.4.1 project

Open LeoLeal opened this issue 6 years ago • 4 comments

After installing your module using npm, i tried to import It like the example page says, and gulp throws error:

'import' and 'export' may appear only with 'sourceType: module'

It seems your module is malformed. I had to copy the MaskedInput.js code into my project and install Its dependency to make It work properly, but It looses the link to your npm project.

Using babelify + browserify + vueify combo with Vuejs 2.4.1

If you have any questions about this problem, lemme know. I'll gladly to help.

LeoLeal avatar Jul 14 '17 18:07 LeoLeal

I Have the same issue

MordiSacks avatar Aug 01 '17 21:08 MordiSacks

I have the same issue

error: Processing of node_modules/vue-masked-input/dist/maskedInput.js failed. SyntaxError: 'import' and 'export' may only appear at the top level (5:4)

amandamcg avatar Sep 27 '17 01:09 amandamcg

And I have the same issue

cheesytim avatar Dec 21 '17 14:12 cheesytim

You can try to declare this module. In some file in project need to write declare module 'vue-masked-input';

I use ts and it's works for me

QoreCode avatar Feb 15 '19 15:02 QoreCode