ktquez/vue-extend-layout

Laravel MIX: Module build failed: Syntax error: C:/.../vue-extend-layout.vue: Unexpected token (51:19)

Closed this issue · 3 comments

Hi, i have error after install and import.

NPM v5.6.0
Vue CLI v 2.9.6
Windows 10

My steps:

  1. npm install vue-extend-layout --save
  2. In my main js file: import VueExtendLayouts from 'vue-extend-layout'

Error after npm run watch:
image

Package.json:

{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.4",
"popper.js": "^1.14.5",
"vue": "^2.5.7"
},
"dependencies": {
"node-sass": "^4.10.0",
"validate.js": "^0.12.0",
"vue-extend-layout": "^2.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
}
}

Im new to npm, if you need more info tell me.

Do you have updated Babel and Webpack?

If necessary install syntax-dynamic-import and add the plugin it in .babelrc

Or uses babel-preset-env

Do you have updated Babel and Webpack?

If necessary install syntax-dynamic-import and add the plugin it in .babelrc

Thank you, it helps, but version of this plugin not compatible with a babel-core 6.3 which used by laravel mix.
I google in this direction and find this solution, it works for me: laravel-mix/laravel-mix#1249 (comment)