vue-datepicker icon indicating copy to clipboard operation
vue-datepicker copied to clipboard

vue-datepicker.vue Unexpected token <

Open smarbos opened this issue 8 years ago • 7 comments

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!

smarbos avatar Feb 15 '17 19:02 smarbos

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.

wushan avatar Mar 02 '17 14:03 wushan

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

lx4r avatar Mar 27 '17 12:03 lx4r

Same problem with nuxt

Darkside73 avatar Apr 29 '17 22:04 Darkside73

+1

Jeffreyrn avatar May 24 '17 02:05 Jeffreyrn

Same problem with nuxt

Jutanium avatar Jun 07 '17 04:06 Jutanium

same problem here

SteveJay7 avatar Aug 12 '17 06:08 SteveJay7

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

danieloprado avatar Nov 28 '17 17:11 danieloprado