-
Notifications
You must be signed in to change notification settings - Fork 28
ypeError: getOptions is not a function #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
loader-utils 0.2.17 删除了 getOptions:parseQuery() will be replaced with getOptions() in the next major version of loader-utils. |
同问,这个问题要怎么解决呢 |
Breaking Changes in loader-utils v3
|
maybe you should add loader-utils as dependencies? so it works with pnpm |
It seems that Webpack V5 has method |
@coder-chin with pnpm, only top and direct dependencies could be referenced, thus "require(‘loader-utils’)" will fail. |
是否有解决办法 |
我遇到来类似的问题,在我的项目中,某个包依赖使用loader-utils,并默认安装了最新版本3.3.1,有了如下相同的报错:
我尝试通过显式锁定loader-utils版本到2.0.4解决了类似的问题。方法如下:
删除node_modules,然后重新install,解决了该问题。 |
ERROR in ./node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js
Module build failed (from ./node_modules/antd-dayjs-webpack-plugin/src/init-loader.js):
TypeError: getOptions is not a function
The text was updated successfully, but these errors were encountered: