hilongjw / vue-datepicker

[Deprecated] calendar and datepicker component with material design for Vue.js
http://hilongjw.github.io/vue-datepicker/demo.html
MIT License
702 stars 207 forks source link

vue-datepicker.vue Unexpected token < #91

Open smarbos opened 7 years ago

smarbos commented 7 years ago

Hello, im using NuxtJS with Vue2,

I've followed the instructions and im getting a Vue.js error

/home/smarbos/camba/devel/nuxt-dos/node_modules/vue-datepicker/vue-datepicker.vue:1
(function (exports, require, module, __filename, __dirname) { <style scoped>
                                                              ^
SyntaxError: Unexpected token <
    at Object.exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (__vue_ssr_bundle__:4366:18)
    at __webpack_require__ (__vue_ssr_bundle__:21:30)

I'm doing something wrong?

Node v7.5.0 Npm v4.1.2

Thanks!

wushan commented 7 years ago

I am facing the same problem here, but it works well when I was developing the project 2 month ago.

I ran into this problem today when trying to npm run dev nuxt.

lx4r commented 7 years ago

Same problem, I'm working with Electron and Vue 2. For me it occurred right after installing the datepicker via NPM.

A part of my vue component:

<script>
  import myDatepicker from 'vue-datepicker'

  export default {
    components: {
      'date-picker': myDatepicker
    }

Node 6.10.0

Darkside73 commented 7 years ago

Same problem with nuxt

Jeffreyrn commented 7 years ago

+1

Jutanium commented 7 years ago

Same problem with nuxt

SteveJay7 commented 7 years ago

same problem here

danieloprado commented 6 years ago

workaround: import Datepicker from 'vue-datepicker/vue-datepicker-es6.vue';