Why do I configure startup error Cannot find module 'vux-loader', after vux and vux-loader installation?

var path = require ("path")
var utils = require (". / utils")
var config = require (". / config")
var webpack = require ("webpack")
var vueLoaderConfig = require (". / vue-loader.conf")
function resolve (dir) {
return path.join (_ _ dirname,".", dir)
}

let originalConfig = {
entry: {

app: "./src/main.js"

},
output: {

path: config.build.assetsRoot,
filename: "[name].js",
publicPath: process.env.NODE_ENV === "production"
  ? config.build.assetsPublicPath
  : config.dev.assetsPublicPath

},
resolve: {

extensions: [".js", ".vue", ".json", ".css"],
alias: {
  "vue$": "vue/dist/vue.esm.js",
  "@": resolve("src")
}

},
module: {

rules: [
  {
    test: /\.vue$/,
    loader: "vue-loader",
    options: vueLoaderConfig
  },
  {
    test: /\.js$/,
    loader: "babel-loader",
    include: [resolve("src"), resolve("test")]
  },
  {
    test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
    loader: "url-loader",
    options: {
      limit: 10000,
      name: utils.assetsPath("img/[name].[hash:7].[ext]")
    }
  },
  {
    test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
    loader: "url-loader",
    options: {
      limit: 10000,
      name: utils.assetsPath("fonts/[name].[hash:7].[ext]")
    }
  }
]

},
plugins: [

]
new webpack.optimize.CommonsChunkPlugin("common.js"),
new webpack.ProvidePlugin({
  jQuery: "jquery",
  $: "jquery"
})

]
}
var vuxLoader = require ("vux-loader")
var webpackConfig = originalConfig / / the original module.exports code assigns values to the variable webpackConfig
module.exports = vuxLoader.merge (webpackConfig, {
plugins: [

)
{
  name: "vux-ui"
},
{
  name: "duplicate-style"
}

]
})

Feb.27,2021

Brother, how did you solve


ah, I also encountered this problem.


I also encountered this problem.
there is no problem with my installation at home.
to the company installation, this question appears?

Menu