R
R
Ruslan Absalyamov2019-02-16 11:30:59
Vue.js
Ruslan Absalyamov, 2019-02-16 11:30:59

Module not Error: Can't resolve '@babel/runtime/helpers/classCallCheck'?

This is due to a bug in the vue-bootstrap component. But when compiling webpack, an error occurs with babel like

RROR in ./node_modules/bootstrap-vue/es/directives/scrollspy/scrollspy.class.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/classCallCheck' in '/home/ruslan/Development/implant_city_frontend/node_modules/bootstrap-vue/es/directives/scrollspy'

ERROR in ./node_modules/bootstrap-vue/es/utils/bv-event.class.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/classCallCheck' in '/home/ruslan/Development/implant_city_frontend/node_modules/bootstrap-vue/es/utils'

Etc. Many such errors are associated with this component. How to be here and how to solve it?
Here are the webpack configs
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');

const config = {
    entry: "./src/main.js",
    output: {
        path: path.resolve(__dirname, "dist"),
        publicPath: "dist",
        filename: "build.js"
    },
    module: {
        rules: [
            {
                test: /\.vue$/,
                use: 'vue-loader',
            },
            {
                test: /\.css$/,
                use: [
                    { loader: "style-loader" },
                    { loader: "css-loader" }
                ]
            },
            {
                test: /\.scss$/,
                use: [
                    { loader: "style-loader" },
                    { loader: "css-loader" },
                    { loader: "sass-loader" }
                ]
            },
            {
                test: /\.svg$/,
                loader: 'vue-svg-loader',
            }
        ]
    },
    resolve: {
        alias: {
            vue: 'vue/dist/vue.js'
        }
    },

    plugins: [
        new VueLoaderPlugin()
    ],
};

module.exports = (env, argv) => {
    if (argv.mode !== "production") {
        config.mode = "development";
        config.devtool = 'source-map';
        config.watch = true;
        config.devServer = { contentBase: __dirname + '/' }
    }
    return config;
};

And package.json
{
  "dependencies": {
    "@babel/polyfill": "^7.2.5",
    "axios": "^0.18.0",
    "bootstrap-vue": "^2.0.0-rc.12",
    "copy-webpack-plugin": "^4.6.0",
    "extract-text-webpack-plugin": "^3.0.2",
    "file-loader": "^1.1.11",
    "file-saver": "^2.0.0",
    "mini-css-extract-plugin": "^0.4.5",
    "moment": "^2.24.0",
    "qs": "^6.6.0",
    "stf-vue-select": "^0.1.12",
    "url-loader": "^1.0.1",
    "v-mask": "^1.3.3",
    "v-money": "^0.8.1",
    "vee-validate": "^2.1.7",
    "vue": "^2.6.6",
    "vue-clickaway": "^2.2.2",
    "vue-flatpickr-component": "^8.1.1",
    "vue-loader": "^15.6.2",
    "vue-lodash": "^2.0.0",
    "vue-router": "^3.0.2",
    "vue-style-loader": "^4.1.0",
    "vuedraggable": "^2.17.0",
    "vuex": "^3.1.0",
    "webpack": "^4.29.4"
  },
  "devDependencies": {
    "babel-loader": "^8.0.5",
    "css-loader": "^0.28.11",
    "node-sass": "^4.11.0",
    "sass-loader": "^7.1.0",
    "style-loader": "^0.21.0",
    "vue-svgicon": "^3.2.2",
    "vue-template-compiler": "^2.6.6",
    "webpack-cli": "^3.2.3",
    "webpack-dev-server": "^3.1.14"
  }
}

I still didn’t understand what he wants from me and why he used to work fine before, but now when updating npm, such errors began to appear

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question