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

πŸ› [BUG] #11399

Closed
dariolacuesta opened this issue Nov 27, 2024 · 1 comment
Closed

πŸ› [BUG] #11399

dariolacuesta opened this issue Nov 27, 2024 · 1 comment

Comments

@dariolacuesta
Copy link

πŸ› Bug

In a newly initialized project using Ant Design Pro, an error occurs stating that the dayjs module cannot be resolved, even though it is correctly installed in node_modules. This issue happens when trying to use components like DatePicker and others from @ant-design/pro-field.


πŸ“· Recurrence Steps

  1. Initialize a new project using the Ant Design Pro template.
    npx @umijs/create-umi-app my-app
  2. Install dependencies with npm install or yarn install.
  3. Start the development server using npm run dev or yarn dev.
  4. Observe the errors related to dayjs in the terminal.
    Captura de pantalla 2024-11-27 114816

🏞 Expected Results

The development server should start without errors, and components like DatePicker should work correctly with dayjs.


πŸ’» Recurrence Code

A clean, newly initialized Ant Design Pro project from master with no additional modifications.


Β© Version Information

  • Ant Design Pro Version: [e.g. 6.0.0]
  • **@umijs/max": "^4.1.0"
  • **Browser Environment: Chrome 118.0.0]
  • **Development Environment: Windows 10]

πŸš‘ Additional Information

Here is the error log from the terminal:

Module not found: Error: Can't resolve 'dayjs' in ...
...
Module not found: Error: Can't resolve 'dayjs/plugin/advancedFormat' in ...

node_modules/dayjs is present, and the package structure seems correct. The issue persists even after cleaning the cache and reinstalling dependencies.

Copy link

当前 Issue ζœͺζ£€ζ΅‹εˆ°ζ ‡ι’˜οΌŒθ―·θ§„θŒƒε‘«ε†™οΌŒθ°’θ°’οΌ

The title of the current issue is not detected, please fill in according to the specifications, thank you!

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

1 participant