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

longFormatters is not exported from package date-ins #12282

Closed
landymore opened this issue Mar 1, 2024 · 4 comments
Closed

longFormatters is not exported from package date-ins #12282

landymore opened this issue Mar 1, 2024 · 4 comments
Labels
component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@landymore
Copy link

landymore commented Mar 1, 2024

Steps to reproduce

Update dependencies to current on a next js app using ncu:

 @azure/msal-browser                        ^3.7.1  →          ^3.10.0
 @azure/msal-react                         ^2.0.10  →          ^2.0.12
 @babel/preset-env                         ^7.23.9  →          ^7.24.0
 @emotion/react                            11.11.3  →          11.11.4
 @mui/icons-material                       ^5.15.6  →         ^5.15.11
 @mui/lab                          5.0.0-alpha.162  →  5.0.0-alpha.166
 @mui/material                              5.15.6  →          5.15.11
 @mui/system                                5.15.6  →          5.15.11
 @mui/x-data-grid                          ^6.19.2  →          ^6.19.5
 @mui/x-data-grid-generator                ^6.19.2  →          ^6.19.5
 @mui/x-date-pickers                       ^6.19.2  →          ^6.19.5
 @testing-library/react                    ^14.1.2  →          ^14.2.1
 @types/node                              ^20.11.6  →        ^20.11.24
 @types/react                             ^18.2.48  →         ^18.2.61
 @types/react-dom                         ^18.2.18  →         ^18.2.19
 @typescript-eslint/eslint-plugin          ^6.19.1  →           ^7.1.0
 @typescript-eslint/parser                 ^6.19.1  →           ^7.1.0
 apexcharts                                 3.45.2  →           3.46.0
 axios                                      ^1.6.6  →           ^1.6.7
 date-fns                                  ^2.30.0  →           ^3.3.1
 eslint                                     8.56.0  →           8.57.0
 eslint-config-next                         14.1.0  →           14.1.1
 next                                      ^14.0.4  →          ^14.1.1
 react-router-dom                          ^6.21.3  →          ^6.22.2
 react-tooltip                             ^5.26.0  →          ^5.26.3

Execute npm run build

next.config.js:

module.exports = {
  reactStrictMode: true,
  distDir: 'dist',
  staticPageGenerationTimeout: 1000,
  output: 'export'
};

Current behavior

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
 ✓ Linting and checking validity of types    
   Creating an optimized production build ...
   Disabled SWC as replacement for Babel because of custom Babel configuration "babel.config.json" https://nextjs.org/docs/messages/swc-disabled
   Using external babel configuration from [redacted]/babel.config.json
   Disabled SWC as replacement for Babel because of custom Babel configuration "babel.config.json" https://nextjs.org/docs/messages/swc-disabled
   Disabled SWC as replacement for Babel because of custom Babel configuration "babel.config.json" https://nextjs.org/docs/messages/swc-disabled
   Using external babel configuration from [redacted]/babel.config.json
Failed to compile.

./node_modules/@mui/x-date-pickers/AdapterDateFns/AdapterDateFns.js
Module not found: Package path ./_lib/format/longFormatters is not exported from package [redacted]/node_modules/date-fns (see exports field in [redacted]/node_modules/date-fns/package.json)

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/@mui/x-date-pickers/AdapterDateFns/index.js
./src/pages/_app.js


> Build failed because of webpack errors

Expected behavior

Successful compile

Context

Trying to keep dependencies current.

Your environment

  System:
    OS: macOS 14.3.1
  Binaries:
    Node: 20.8.0 - /usr/local/bin/node
    npm: 10.4.0 - /usr/local/bin/npm
    pnpm: 8.15.4 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 122.0.6261.94
    Edge: Not Found
    Safari: 17.3.1
  npmPackages:
    @emotion/react: 11.11.4 => 11.11.4 
    @emotion/styled: 11.11.0 => 11.11.0 
    @mui/base:  5.0.0-beta.37 
    @mui/core-downloads-tracker:  5.15.11 
    @mui/icons-material: ^5.15.11 => 5.15.11 
    @mui/lab: 5.0.0-alpha.166 => 5.0.0-alpha.166 
    @mui/material: 5.15.11 => 5.15.11 
    @mui/private-theming:  5.15.11 
    @mui/styled-engine:  5.15.11 
    @mui/system: 5.15.11 => 5.15.11 
    @mui/types:  7.2.13 
    @mui/utils:  5.15.11 
    @mui/x-data-grid: ^6.19.5 => 6.19.5 
    @mui/x-data-grid-generator: ^6.19.5 => 6.19.5 
    @mui/x-data-grid-premium:  6.19.5 
    @mui/x-data-grid-pro:  6.19.5 
    @mui/x-date-pickers: ^6.19.5 => 6.19.5 
    @mui/x-license-pro:  6.10.2 
    @types/react: ^18.2.61 => 18.2.61 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: ^5.3.3 => 5.3.3 

Search keywords: exports AdapterDateFns

@landymore landymore added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 1, 2024
@Farzin-Firoozi
Copy link

I have this issue too.

@tugay-radity
Copy link

tugay-radity commented Mar 3, 2024

Using the below worked for me.
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';

@LukasTy
Copy link
Member

LukasTy commented Mar 4, 2024

It's a duplicate of #12144.
Please check #12144 (comment) for more information. 🙏

@LukasTy LukasTy closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@LukasTy LukasTy added duplicate This issue or pull request already exists component: pickers This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 4, 2024
Copy link

github-actions bot commented Mar 4, 2024

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @landymore?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants