安装了一个vue的UI库之后Electron突然报这个错,删除node_modules重新npm install也不行
ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.\
- configuration[0] should be an array:\
[non-empty string | object { from, to?, context?, toType?, test?, force?, ignore?, flatten?, cache?, transform?, transformPath?, … }, ...]
最后的解决办法:
1.删除 node_modules/electron
2.设置系统环境变量(淘宝源)
ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/
// 特别说明:一定要注意最后的一个 /,不加可能会提示 zip 包找不到
3.重新安装
npm install electron --save-dev