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

rrule import (scheduler-core) error seems still to exist #3644

Closed
1 task done
NoerNova opened this issue Mar 24, 2023 · 8 comments
Closed
1 task done

rrule import (scheduler-core) error seems still to exist #3644

NoerNova opened this issue Mar 24, 2023 · 8 comments
Assignees
Labels

Comments

@NoerNova
Copy link

Is there an existing issue for this?

  • I have searched this repository's issues and believe that this is not a duplicate.

I'm using ...

React Scheduler

Current Behaviour

Screenshot 2566-03-25 at 01 03 20

Expected Behaviour

DX components should correctly render.

Steps to Reproduce

To Reproduce

Environment

  • next: ^13.2.4
  • react: ^18.2.0
  • dx-react-core: ^4.0.3
  • dx-react-scheduler: ^4.0.3
  • dx-react-scheduler-material-ui: ^4.0.3
  • @mui/icons-material: ^5.11.11
  • @mui/lab: ^5.0.0-alpha.124
  • @mui/material: ^5.11.14
  • @mui/x-date-pickers: ^6.0.3
@omgaunicorn
Copy link

omgaunicorn commented Jun 5, 2023

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.

@artem-kurchenko
Copy link

artem-kurchenko commented Jun 9, 2023

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

@Fensterbank
Copy link

Fensterbank commented Jun 10, 2023

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!

@EmielH
Copy link

EmielH commented Jun 10, 2023

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?

@artem-kurchenko
Copy link

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

@EmielH
Copy link

EmielH commented Jun 12, 2023

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

@github-actions github-actions bot added the stale label Jul 13, 2023
@github-actions
Copy link

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.

@artem-kurchenko
Copy link

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
    },
  }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants