primefaces / sakai-react

Free React Admin Template
https://sakai.primereact.org
MIT License
898 stars 567 forks source link

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

Closed grounzero closed 1 year ago

grounzero commented 5 years ago

after I do npm start I get

sigma-react@2.0.0-beta.2-SNAPSHOT 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'

alaindeurveilher commented 5 years ago

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

grounzero commented 5 years ago

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

alaindeurveilher commented 5 years ago

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'
    }
    };
srbala commented 5 years ago

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

alaindeurveilher commented 5 years ago

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

srbala commented 5 years ago

@grounzero @cagataycivici this issue resolve, close it