P
P
Pavel2019-04-17 11:18:42
Vue.js
Pavel, 2019-04-17 11:18:42

Can you tell me what is the problem of connecting the vue-mapbox component?

I did everything according to the instructions on a clean project and no problems. But when I import a package in an existing project, something strange happens:

Failed to compile.

    ./node_modules/vue-mapbox/src/components/layer/GeojsonLayer.js
    Module parse failed: Unexpected token (110:10)
    You may need an appropriate loader to handle this file type.
    |         const source = {
    |           type: "geojson",
    |           ...this.source
    |         };
    |         try {
     @ ./node_modules/vue-mapbox/src/main.js 11:0-59
     @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/drivers/Testmap.vue
     @ ./src/components/drivers/Testmap.vue
     @ ./src/router/index.js
     @ ./src/main.js
     @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

I can't figure out what's going on. Can someone tell me :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Bobkov, 2019-04-17
@heksen

You may need an appropriate loader to handle this file type.
You need to install a downloader for this file type.
In general, you still need to install an additional extension.
It is possible that: npm install geojson

P
Paul, 2019-04-25
@Pau10

Working hypothesis: Vue-loader v14 is not friendly with the VueMapbox component. And the 15th version failed to start. So, apparently, you will have to abandon the component and screw the mapbox manually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question