Module not found: Can't resolve 'primereact/schedule'
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'
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
Thanks, I got it working by renaming primereact/schedule with primereact/fullcalendar.
To make it work, you need to:
-
import {FullCalendar} from 'primereact/fullcalendar';instead ofimport {Schedule} from 'primereact/schedule'; - use the
optionsproperty instead ofheaderanddefaultDate. 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} />
@grounzero @AlainD- this issue has been resolved, verify and close
I checked, and it's solved since Sigma React 3.0.0
@grounzero @cagataycivici this issue resolve, close it