运行vue ERROR Error loading D:\code\family-server\property-server-manage-master\vue.config.js

现在利用初始化以及运行vue,缺失文件以及运行出现以下错误


npm run serve

> vue-antd-pro@2.1.0 serve
> vue-cli-service serve

 ERROR  Error loading D:\code\family-server\property-server-manage-master\vue.config.js:
 ERROR  ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.
 - options should be one of these:
   object { resourceRegExp, contextRegExp? } | object { checkResource }
   Details:
    * options misses the property 'resourceRegExp'. Should be:
      RegExp
      -> A RegExp to test the request against.
    * options misses the property 'checkResource'. Should be:
      function
      -> A filter function for resource and context.
ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.
 - options should be one of these:
   object { resourceRegExp, contextRegExp? } | object { checkResource }
   Details:
    * options misses the property 'resourceRegExp'. Should be:
      RegExp
      -> A RegExp to test the request against.
    * options misses the property 'checkResource'. Should be:
      function
      -> A filter function for resource and context.
    at validate (D:\code\family-server\property-server-manage-master\node_modules\_schema-utils@3.1.1@schema-utils\dist\validate.js:105:11)
    at D:\code\family-server\property-server-manage-master\node_modules\_webpack@5.65.0@webpack\lib\util\create-schema-validation.js:16:17
    at new IgnorePlugin (D:\code\family-server\property-server-manage-master\node_modules\_webpack@5.65.0@webpack\lib\IgnorePlugin.js:28:3)
    at Object.<anonymous> (D:\code\family-server\property-server-manage-master\vue.config.js:35:13)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)

改一下vue.config.js文件下的
plugins:[
错误写法:;
// new webpack.IgnorePlugin(/^./locale$/, /moment$/)
正确写法:
 new webpack.IgnorePlugin({
      resourceRegExp: /^./locale$/,
      contextRegExp: /moment$/,
    }),
]

仔细检查一下你执行这个项目的路径,你有没有进入到这个项目里执行那个命令,当前目录是不是property-server-manage-master可别搞成family-server