Skip to content
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

config-overrides.js err #383

Open
phanquanDHTB opened this issue Dec 13, 2022 · 5 comments
Open

config-overrides.js err #383

phanquanDHTB opened this issue Dec 13, 2022 · 5 comments

Comments

@phanquanDHTB
Copy link

Compiled with problems:X

ERROR in ./src/Home/less/antMotionStyle.less (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[9].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[9].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[9].use[3]!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[9].use[4]!./src/Home/less/antMotionStyle.less)

Module build failed (from ./node_modules/less-loader/dist/cjs.js):

@import "~antd/lib/style/themes/default.less";
^
Less resolver error:
'~antd/lib/style/themes/default.less' wasn't found. Tried - C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\src\Home\less~antd\lib\style\themes\default.less,npm://~antd\lib\style\themes\default.less,~antd\lib\style\themes\default.less

Webpack resolver error details:
resolve '~antd/lib/style/themes/default.less' in 'C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\src\Home\less'
Parsed request is a module
using description file: C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\package.json (relative path: ./src/Home/less)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\src\Home\less\node_modules doesn't exist or is not a directory
C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\src\Home\node_modules doesn't exist or is not a directory
C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\src\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\node_modules
C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\node_modules~antd doesn't exist
C:\Users\84979\Desktop\NextSolLandingPage\node_modules doesn't exist or is not a directory
C:\Users\84979\Desktop\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\84979\node_modules
C:\Users\84979\node_modules~antd doesn't exist
C:\Users\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\node_modules
C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\node_modules~antd doesn't exist

Webpack resolver error missing:
undefined

  Error in C:\Users\84979\Desktop\NextSolLandingPage\ns-landingpage\src\Home\less\custom.less (line 1, column 0)
@abovzv
Copy link

abovzv commented Dec 19, 2022

Have you solved this problem? I got the same bug here.

@abovzv
Copy link

abovzv commented Dec 19, 2022

BTW, there is no themes/default.less file anywhere.

@abovzv
Copy link

abovzv commented Dec 19, 2022

Now I solve this problem by degrade the version of antd from 5.0.1 to 4.x.x, and download @antd/icon

@hoa-nguyen-bk
Copy link

degrade the version of antd from 5.0.1 to 4.x.x, and download @antd/icon

not good for me, it make new error:

Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'plugins'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap?, implementation? }
    at validate (F:\BACH_KINH_XAY\232\cnpmnc\btl\vinastack-doctor-managerment\node_modules\schema-utils\dist\validate.js:191:11)
    at Object.getOptions (F:\BACH_KINH_XAY\232\cnpmnc\btl\vinastack-doctor-managerment\node_modules\webpack\lib\NormalModule.js:646:19)
    at Object.loader (F:\BACH_KINH_XAY\232\cnpmnc\btl\vinastack-doctor-managerment\node_modules\postcss-loader\dist\index.js:40:24)

@MJ666-K
Copy link

MJ666-K commented Jul 16, 2024

将版本antd从降级5.0.14.x.x,并下载@antd/icon

对我来说不好,它会产生新的错误:

Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'plugins'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap?, implementation? }
    at validate (F:\BACH_KINH_XAY\232\cnpmnc\btl\vinastack-doctor-managerment\node_modules\schema-utils\dist\validate.js:191:11)
    at Object.getOptions (F:\BACH_KINH_XAY\232\cnpmnc\btl\vinastack-doctor-managerment\node_modules\webpack\lib\NormalModule.js:646:19)
    at Object.loader (F:\BACH_KINH_XAY\232\cnpmnc\btl\vinastack-doctor-managerment\node_modules\postcss-loader\dist\index.js:40:24)

Did you solve it? I'm having this error right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants