GithubHelp home page GithubHelp logo

Comments (8)

artem-kurchenko avatar artem-kurchenko commented on June 1, 2024 3

Hi @omgaunicorn ,

You need to add our packages to transpilePackages in next.config proper operation.

const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  transpilePackages: [
    '@mui/icons-material',
    '@mui/x-date-pickers',
    'rrule',
    '@devexpress/dx-react-core',
    '@devexpress/dx-scheduler-core',
    '@devexpress/dx-react-scheduler-material-ui',
    '@devexpress/dx-react-scheduler',
    '@devexpress/dx-react-grid-material-ui'
  ],
};

module.exports = nextConfig;

See the following ticket where we created an example: t1159998

from devextreme-reactive.

EmielH avatar EmielH commented on June 1, 2024 1

Hi @artem-kurchenko
Thanks a lot for your reply! I have managed to create a reproduction scenario given your application template. If you run npm run test in this example, the error occurs.

The error started occurring after adding React Testing Library dependencies.

test-react-vite.zip

from devextreme-reactive.

omgaunicorn avatar omgaunicorn commented on June 1, 2024

Facing the same issue; in my app I want to update @mui/x-date-pickers to v6, but the Scheduler implodes with the rrule error when trying to do this.

Up until now this library has been great but this has been a blocker for a couple months now and it's making us reconsider changing the DevExtreme Reactive components for something else 😕

Environment:

  • next: ^12.3.0
  • react: ^18.2.0
  • dx-react-core: ^4.0.4
  • dx-react-scheduler: ^4.0.4
  • dx-react-scheduler-material-ui: ^4.0.4
  • @mui/icons-material: ^5.11.16
  • @mui/lab: ^5.0.0-alpha.126
  • @mui/material: ^5.12.0
  • @mui/x-date-pickers: ^6.6.0

Edit: upon further checking, it seems that even with MUI Date Pickers still at 5.0.20, the change from Scheduler from 4.0.2 to 4.0.3 introduces the breaking change. A patch version update should not introduce any breaking changes, so I hope this gets addressed soon.

from devextreme-reactive.

Fensterbank avatar Fensterbank commented on June 1, 2024

We had the same issue after upgrading from 3.x to the latest version.
I can confirm adding these lines to our next.config.js fixed the issue for us.
Thanks!

from devextreme-reactive.

EmielH avatar EmielH commented on June 1, 2024

We have the same issue but we're not using Next. We're using Vite and the error pops up when running unit tests using Vitest. Is there anything similar we can do in the Vite configuration?

from devextreme-reactive.

artem-kurchenko avatar artem-kurchenko commented on June 1, 2024

Hi @EmielH
I didn't reproduce the issue using the latest vite application template.
Could you please verify if you're using the latest v4.0.4. If so, please modify my example to demonstrate how to reproduce the issue.
test-react-vite.zip

from devextreme-reactive.

github-actions avatar github-actions commented on June 1, 2024

Thank you for using Devextreme Reactive. We use GitHub issues to track bug and feature requests. We process incoming issues as soon as possible. Issues that have been inactive for 30 days are closed. If you have an active DevExtreme license, you can contact us in our Support Center for updates. Otherwise, post your question on StackOverflow.

from devextreme-reactive.

artem-kurchenko avatar artem-kurchenko commented on June 1, 2024

The following configuration in vitest.config.ts should solve the issue in testing:

import react from "@vitejs/plugin-react";
import { defineConfig } from 'vitest/config';

export default defineConfig({
  plugins: [
    react()
  ],
  test: {
    environment: 'jsdom',
    deps: {
      inline: [
        "rrule", "@devexpress/dx-scheduler-core", "@devexpress/dx-react-scheduler", "@devexpress/dx-react-scheduler-material-ui", 
      ],
      registerNodeLoader: true,
      fallbackCJS: true,
      interopDefault: true
    },
  }
});

from devextreme-reactive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.