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

TimePicker is missing style folder #40420

Closed
nataliakukula opened this issue Jan 27, 2023 · 2 comments
Closed

TimePicker is missing style folder #40420

nataliakukula opened this issue Jan 27, 2023 · 2 comments

Comments

@nataliakukula
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Issue:

Ant Design version 5 is producing Uncaught Error: Cannot find module 'antd/lib/time-picker/style' when importing TimePicker.

See StackOverflow issue:

https://stackoverflow.com/questions/74688880/how-to-solve-timepicker-import-problem-on-ant-design-5-0-3

Bug:

When looking into the node_modules/antd folder it seems that time-picker folder component doesn't include any style folder, but all other components have one. I'm guessing it's missing a file from moving time-picker outside of the date-picker folder since release 5.0.0.

To reproduce:

Import Ant Design: yarn add antd
Add time-picker to file: import {TimePicker} from 'antd'
Implement it.
You will get the module error.

Version: ^5.0.0.

What is expected?

If you copy and paste the style folder from date-picker into the time-picker folder it seems to work.

What is actually happening?

TimePicker cannot be used in a production pipeline.

Environment Info
antd 5.1.6
React React ^17.0.0
System Node v16.13.2
Browser Chrome Version 109.0.5414.119 (Official Build) (x86_64)

Link to reproduce doesn't give the error, because of missing node modules.

@github-actions
Copy link
Contributor

@afc163
Copy link
Member

afc163 commented Jan 28, 2023

Please remove babel-plugin-import after 5.0.0.

See https://ant.design/docs/react/migration-v5-cn/

@afc163 afc163 closed this as completed Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants