ValidationError: Invalid options object. Copy Plugin has been initialized using an options object th

在这里插入图片描述
问题:css-loader版本太高。
解决方案:进入packing.json,降低css版本;npm install重新安装,npm run dev重启

在这里插入图片描述

ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
 - options[0] misses the property 'patterns'. Should be:
   [non-empty string | object { from, to?, context?, globOptions?, filter?, toType?, force?, priority?, info?, transform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
    at validate (D:\java\vuevue\hello-vue\node_modules\copy-webpack-plugin\node_modules\schema-utils\dist\validate.js:104:11)
    at new CopyPlugin (D:\java\vuevue\hello-vue\node_modules\copy-webpack-plugin\dist\index.js:38:31)
    at Object.<anonymous> (D:\java\vuevue\hello-vue\build\webpack.dev.conf.js:61:5)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at requireConfig (D:\java\vuevue\hello-vue\node_modules\webpack\bin\convert-argv.js:97:18)
    at D:\java\vuevue\hello-vue\node_modules\webpack\bin\convert-argv.js:104:17
    at Array.forEach (<anonymous>)
    at module.exports (D:\java\vuevue\hello-vue\node_modules\webpack\bin\convert-argv.js:102:15)
    at Object.<anonymous> (D:\java\vuevue\hello-vue\node_modules\webpack-dev-server\bin\webpack-dev-server.js:224:50)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) {
  errors: [
    {
      keyword: 'required',
      dataPath: '[0]',
      schemaPath: '#/required',
      params: { missingProperty: 'patterns' },
      message: "should have required property 'patterns'",
      schema: {
        patterns: { type: 'array', minItems: 1, items: { anyOf: [Array] } },
        options: {
          type: 'object',
          additionalProperties: false,
          properties: { concurrency: [Object] }
        }

问题:copy-webpack-plugin版本太高。
解决方案:进入packing.json,降低版本

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
根据引用和引用,"ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema."是一个错误信息,意味着Ignore Plugin使用了一个与API架构不匹配的选项对象。根据引用中给出的提示,正确的选项对象应该包含'resourceRegExp'属性(一个正则表达式用于测试请求)或者'checkResource'属性(一个用于过滤资源和上下文的函数)。在错误信息中,'resourceRegExp'属性缺失,应该是一个正则表达式。因此,要解决这个错误,你需要提供一个合法的选项对象,并确保该对象符合API架构的要求。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object](https://blog.csdn.net/qq_39695210/article/details/127365383)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [vue 项目npmrun 报错:ValidationError: Invalid options ... Ignore Plugin has been initialized using an](https://blog.csdn.net/baidu_28753677/article/details/125427526)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [运行/bin/kibana报错FATAL Error: listen EADDRNOTAVAIL 123.57.251.57:5601](https://download.csdn.net/download/weixin_38669832/14052771)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值