ERROR Error loading 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.
解决办法,升级插件的版本
"compression-webpack-plugin": "^3.0.0" => "^9.0.0"
INFO Starting development server...
error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
...
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
Node.js v17.0.1
节点 17.0.0的发行说明中提到了此错误,并提供了建议的解决方法:
如果您在使用 Node.js 17 的应用程序中遇到ERR_OSSL_EVP_UNSUPPORTED错误,很可能是您的应用程序或您正在使用的模块尝试使用 OpenSSL 3.0 默认不再允许的算法或密钥大小。添加了命令行选项--openssl-legacy-provider以恢复到旧版提供程序,作为这些收紧限制的临时解决方法。
其他解决方案
这个是由于新版本的node不兼容引起的,需要使用v16以下的稳定版。在vue.config.js中找到,dependencies或者devDependencies 将"node":"^17.0.1"移除,此时使用的node将会从17.0.1变为系统默认的node版本。
以下是安装node的命令
node -v 查看node版本号
v17.0.1
sudo n v14.18.1 安装指定node版本