gpt4 book ai didi

vue.js - ValidationError : Invalid options object. Copy Plugin 已使用与 API 架构不匹配的选项对象进行初始化

转载 作者:行者123 更新时间:2023-12-04 16:26:10 24 4
gpt4 key购买 nike

由于漏洞,我刚刚更新了 package.json 中的一些包。所有漏洞都已修复,但是当我运行 npm 时出现以下错误。
在我的漏洞修复期间更新了 Copy Plugin 包。
我尝试从较旧的提交中复制 package.json 并重新安装所有软件包,但该漏洞再次出现。

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?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
- options[1] misses the property 'patterns'. Should be:
[non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)

最佳答案

对于配置问题:
仅在 webpack.common.js 中调整以下部分:

module.exports = {
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: Path.resolve('./modules/web/static/'), to: './assets' },
{ from: Path.resolve('./modules/web/static/favicon.ico'), to: './' },
]
}),
new TsChecker({ typescript: { configFile: Path.resolve('tsconfig.json') } }),

关于vue.js - ValidationError : Invalid options object. Copy Plugin 已使用与 API 架构不匹配的选项对象进行初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63379652/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com