sakai-react icon indicating copy to clipboard operation
sakai-react copied to clipboard

Module not found: Can't resolve 'primereact/schedule'

Open grounzero opened this issue 5 years ago • 6 comments

after I do npm start I get

[email protected] watch-css C:\git\primereact-sigma npm run build-css && node-sass-chokidar src/layout/ -o src/layout/ --watch --recursive | node-sass-chokidar public/assets/layout/ -o public/assets/layout/ --watch --recursive

Failed to compile.

./src/components/DataDemo.js Module not found: Can't resolve 'primereact/schedule'

grounzero avatar Dec 13 '18 14:12 grounzero

Primereact 2 got rid of schedule in favour of fullcalendar. But the sigma theme was last updated in September 25th, and is still not updated to use the new calendar instead of former schedule. That’s why you got the error. I don’t know who’s responsible for this repo, but they don’t seem to be very reactive to maintain the theme up to date. I suppose we’ll have to propose a PR ourselves or something. Me? As a workaround, I temporarily commented out all usage of Schedule at the moment since I don’t use it right now

alaindeurveilher avatar Dec 19 '18 07:12 alaindeurveilher

Thanks, I got it working by renaming primereact/schedule with primereact/fullcalendar.

grounzero avatar Dec 31 '18 14:12 grounzero

To make it work, you need to:

  1. import {FullCalendar} from 'primereact/fullcalendar'; instead of import {Schedule} from 'primereact/schedule';
  2. use the options property instead of header and defaultDate. So use now:
  const options = {
    defaultDate: '2016-01-12',
    header: {
      left: 'prev,next today',
      center: 'title',
      right: 'month,agendaWeek,agendaDay'
    }
  };

<FullCalendar options={options} events={this.state.calendarEvents} />

alaindeurveilher avatar Jan 12 '19 09:01 alaindeurveilher

@grounzero @AlainD- this issue has been resolved, verify and close

srbala avatar Nov 11 '19 11:11 srbala

I checked, and it's solved since Sigma React 3.0.0

alaindeurveilher avatar Nov 15 '19 21:11 alaindeurveilher

@grounzero @cagataycivici this issue resolve, close it

srbala avatar Nov 16 '19 01:11 srbala