【问题标题】:yarn build. Error - Invalid options object纱线构建。错误 - 无效的选项对象
【发布时间】:2021-05-11 22:03:23
【问题描述】:

我学习 React 并尝试构建自己的 webpack5 + babel 设置,运行 yarn build 后我的控制台中出现此错误消息。关于如何解决这个问题或我做错了什么的任何想法?

Failed to load '/Users/admin/webpackFuel/webpack.config.js' config  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?, info?, transform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)

【问题讨论】:

标签: yarnpkg webpack-5


【解决方案1】:

我在这条线索中找到了答案 - npm run dev fails : ValidationError: Invalid options object

https://stackoverflow.com/a/62680933 - 就是这样。完全忘记“模式”这个词

【讨论】:

    猜你喜欢
    • 2018-12-20
    • 2021-10-10
    • 2021-07-22
    • 2021-11-09
    • 2019-10-13
    • 2020-01-30
    • 1970-01-01
    • 2012-11-27
    • 2020-05-06
    相关资源
    最近更新 更多