javascript - Webpack 5.3.1 TypeError:Object.getOwnPropertyDescriptors 不是函数
问题描述
我正在尝试覆盖 IONIC 项目的 webpack.config.js。当我将 webpack 包含到 webpack.config.js 中时,它会出现错误。
Webpack 版本:5.1.3
**webpack.config.js**
var webpack = require('webpack');
**ERROR :**
TypeError: Object.getOwnPropertyDescriptors is not a function
at mergeExports (/Users/XXXX/node_modules/webpack/lib/index.js:48:29)
at Object.<anonymous> (/Users/XXXX/node_modules/webpack/lib/index.js:75:18)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous>
解决方案
推荐阅读
- kubernetes - 为用户 Rancher 添加全局权限失败
- java - 为什么无法从数据库 Firebase 读取数据?
- rascal - CodeMirror 未在更改时更新源
- mysql - 发生日期差异时SQL将日期与ID进行比较
- slack-api - 范围更改时强制重新安装?
- python - 致命的 Python 错误:_Py_HashRandomization_Init:无法获取随机数来初始化 Python
- android - 删除 Jetpack Compose 中的 LazyColumn 过度滚动效果
- r - R:将R中的日期格式从同一天的01:00更改为24:00
- ruby - 无法将现有付款资料设置为客户的默认付款资料
- python - 遍历字典以从键值对中查找值