Webpack packaging error

in the process of real-time packaging using webpack-w, it is found that the packaging failed, and the following error is prompted. Which god can take a look?

the following is my profile

    module: {
        rules: [
            {   
                test: /\.js[x]?$/,
                loader: "babel-loader", 
                exclude: /node_modules/,
                query: {presets: ["es2015", "stage-0", "react"]}
            },
            {
                test: /.*\/styles\/.*\.scss$/,
                use: ExtractTextPlugin.extract(["css-loader", "postcss-loader", "sass-loader"])
            },
            {
                test: [/.*\/views\/.*\.scss$/, /.*\/components\/.*\.scss$/, /.*\/shared\/.*\.scss$/],
                use: ExtractTextPlugin.extract([
                    "css-loader?modules&importLoaders=2&localIdentName=[name]__[local]", 
                    "postcss-loader", 
                    "sass-loader"
                ])
            },
            {
                test: /\.less$/,
                use: ExtractTextPlugin.extract(["css-loader", "less-loader"])
            }
        ]
    },
Mar.20,2021

are you sure the node-sass package is installed


clipboard.png
if there is a problem with the introduction path, it is recommended that you check whether the sass is configured or the less is configured. Do you have any problems locally?

Menu