Skip to content

Can't resolve 'dayjs/dayjs.min' #59

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

Open
mizi-lin opened this issue Apr 12, 2021 · 5 comments
Open

Can't resolve 'dayjs/dayjs.min' #59

mizi-lin opened this issue Apr 12, 2021 · 5 comments

Comments

@mizi-lin
Copy link

在node中使用,

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:12-38
Module not found: Error: Can't resolve 'dayjs/dayjs.min' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:60-98
Module not found: Error: Can't resolve 'dayjs/plugin/isSameOrBefore' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:119-156
Module not found: Error: Can't resolve 'dayjs/plugin/isSameOrAfter' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:178-216
Module not found: Error: Can't resolve 'dayjs/plugin/advancedFormat' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:241-282
Module not found: Error: Can't resolve 'dayjs/plugin/customParseFormat' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:297-328
Module not found: Error: Can't resolve 'dayjs/plugin/weekday' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:344-376
Module not found: Error: Can't resolve 'dayjs/plugin/weekYear' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:394-428
Module not found: Error: Can't resolve 'dayjs/plugin/weekOfYear' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:444-476
Module not found: Error: Can't resolve 'dayjs/plugin/isMoment' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:494-528
Module not found: Error: Can't resolve 'dayjs/plugin/localeData' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'

ERROR in ../hulu-cli/node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js 4:551-590
Module not found: Error: Can't resolve 'dayjs/plugin/localizedFormat' in '/Users/Mizi/minglamp/repo/fe/hulu-cli/node_modules/antd-dayjs-webpack-plugin/src'
@AaronPorts
Copy link

AaronPorts commented Apr 20, 2021

As a workaround try to install dayjs as a dependency.

@GlennOu66304
Copy link

Trying to fix it by"npm install dayjs --save". if it does not work, I will install the old version to get rid of this matter.

@TassainRasool
Copy link

Yarn add dayjs --save worked for me..

@ChamaraPathum
Copy link

''npm i dayjs'' it's worked for me

@snyang
Copy link

snyang commented Feb 22, 2025

I found I have to set the config antd.momentPicker as false

antd: {
  // Transform DayJS to MomentJS
  momentPicker: false,
}

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

6 participants