niksmr / vue-masked-input

Masked input component for Vue.js
https://niksmr.github.io/vue-masked-input/
MIT License
455 stars 93 forks source link

Cannot import from node_modules in a Vue 2.4.1 project #25

Open LeoLeal opened 7 years ago

LeoLeal commented 7 years ago

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.

MordiSacks commented 7 years ago

I Have the same issue

amandamcg commented 6 years ago

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)

cheesytim commented 6 years ago

And I have the same issue

QoreCode commented 5 years ago

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