vue-bootstrap-typeahead icon indicating copy to clipboard operation
vue-bootstrap-typeahead copied to clipboard

Module parse failed: Unexpected token (1:0)

Open rajesh-gs opened this issue 6 years ago • 7 comments

Sorry to dig up this thread again. I am also facing a similar issue

    ERROR in ./node_modules/vue-bootstrap-typeahead/src/components/VueBootstrapTypeahead.vue 1:0
    Module parse failed: Unexpected token (1:0)
    You may need an appropriate loader to handle this file type.
    > <template>
    |   <div>
    |     <div :class="sizeClasses">
     @ ./ClientApp/views/home.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./ClientApp/views/home.vue?vue&type=script&lang=js&) 2:0-97 35:27-48
     @ ./ClientApp/views/home.vue?vue&type=script&lang=js&
     @ ./ClientApp/views/home.vue
     @ ./ClientApp/router/routes.js
     @ ./ClientApp/router/index.js
     @ ./ClientApp/boot-app.js

I tried to provide full import path like @HasnatH 's but it still fails. I am running "vue": "2.5.16", "vue-loader": "15.4.2", "webpack": "^4.28.2", "webpack-cli": "3.1.2", "bootstrap-vue": "^2.0.0-rc.11", "vue-bootstrap-typeahead": "^0.2.6", "@babel/core": "7.2.2", "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-transform-runtime": "7.2.0", "@babel/preset-env": "7.2.3", "@babel/runtime": "7.2.0",

similar to https://github.com/alexurquhart/vue-bootstrap-typeahead/issues/12

rajesh-gs avatar Jan 07 '19 09:01 rajesh-gs

same here, i can't make this library to work in nuxtjs

ikristher avatar Jan 31 '19 10:01 ikristher

+1

dhurba87 avatar Jan 31 '19 14:01 dhurba87

same for me

Skwal avatar Jan 31 '19 14:01 Skwal

+1

15 Mar 12:56:08 - error: undefined of node_modules/vue-bootstrap-typeahead/src/components/VueBootstrapTypeahead.vue failed. rror: Unexpected token (5:4) ^G

overallduka avatar Mar 15 '19 15:03 overallduka

Had the same issue. My problem was related to my webpack vendor config. In my case I needed to add a .vue$ test referencing vue-loader that included node_modules/vue-bootstrap-typeahead to my vendor configuration (which previously didn't have a test for .vue files - my primary webpack config excluded node_modules). Everything seems to work fine after that.

mprigge avatar Apr 26 '19 03:04 mprigge

Same here, how to parse this module so a standard nuxtjs config can import it as a plugin ?

AurelienVernay avatar Jul 28 '19 22:07 AurelienVernay

Same here. Found a solution following the official documentation of nuxt : https://nuxtjs.org/guide/plugins

Create a nuxt plugin and don't forget to set build.transpile property in the nuxt.config according to the documentation.

llienard avatar Aug 27 '19 11:08 llienard