Unknown widget ...ShiftCalendar in tutorial

0
Help please!   Im running through the online crash course.  Module 11 – custom widgets – building the shift calendar. I get the error below: Unknown widget 'abl.shiftcalendar.ShiftCalendar'.   I am on version 8.14.1 (6605). console advises me to check my script for syntax errors. Im using Javascript and the script builds without error.     --------------XML-------------- <?xml version="1.0" encoding="utf-8"?> <widget id="abl.shiftcalendar.ShiftCalendar" pluginWidget="true" needsEntityContext="false" offlineCapable="true" supportedPlatform="Web" xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../node_modules/mendix/custom_widget.xsd"> <name>Shift Calendar</name> <description>Demo shift calendar - mendix online crash course</description> <icon/> <properties> <propertyGroup caption="Data Source"> <property key="shifts" type="datasource" isList="true" required="true"> <caption>Shifts</caption> <description>list of shift objects associated to the planning period</description> </property> <property key="start" type="attribute" dataSource="shifts"> <caption>Start Date attribute</caption> <description>start date attribute</description> <attributeTypes> <attributeType name="DateTime"/> </attributeTypes> </property> <property key="end" type="attribute" dataSource="shifts"> <caption>End Date attribute</caption> <description>end date attribute</description> <attributeTypes> <attributeType name="DateTime"/> </attributeTypes> </property> <property key="employeeName" type="attribute" dataSource="shifts"> <caption>Employee Name</caption> <description>Name of the employee that will take on this shift</description> <attributeTypes> <attributeType name="String" /> </attributeTypes> </property> <property key="editShift" type="action" dataSource="shifts"> <caption>Shift New Edit page</caption> <description></description> </property> <property key="culture" type="enumeration" required="true" defaultValue="nl_NL"> <caption>Culture</caption> <description></description> <enumerationValues> <enumerationValue key="nl_NL">The Netherlands</enumerationValue> <enumerationValue key="nl_BE">Belgium (Dutch)</enumerationValue> <enumerationValue key="fr_BE">Belgium (French)</enumerationValue> <enumerationValue key="fr_FR">France</enumerationValue> <enumerationValue key="de_DE">Germany</enumerationValue> <enumerationValue key="en_US">America</enumerationValue> <enumerationValue key="en_GB">United Kingdom</enumerationValue> </enumerationValues> </property> </propertyGroup> </properties> </widget> --------------JSX-------------- import { Component, createElement } from "react"; import { CalendarContainer } from "./components/CalendarContainer"; import "./ui/ShiftCalendar.css"; class ShiftCalendar extends Component { render() { return <CalendarContainer shifts={} />; } transformEvents() { if (this.props.shifts !== undefined && this.props.shifts.items !== undefined) { return this.props.shifts.items.map(item => { if (this.props.editShift !== undefined) { return { id: item.id, title: this.props.employeeName(item).value, allDay: false, start: this.props.start(item).value, end: this.fixEndDate(item), desc: this.props.employeeName(item).value, onSelectEvent: this.props.editShift(item).execute } } return undefined; }); } return []; } fixEndDate(item) { const date = this.props.end(item).value; date.setSeconds(date.getSeconds() - 1); return date; } }      
asked
4 answers
0

Thank you for such a prompt response and apologies for my delayed one.

My widget is located within the CustomWidgets folder as per the online tutorial.

The build script makes reference to "pluggable-widgets-tools build:web" 
which I understand to be a mendix-endorsed node package to handle widget building.
As such the output seems relative instead of absolute.

I can find the mpk file. It exists within the
"~/CustomWidgets/shiftCalendar/dist/1.0.0" dictory as well as the "~/widgets" directory.

Is there a more detailed log file or output that I can review ?

answered
0

if you stop de watcher and restart it (npm run dev) then you get a lot of script lines, and somethimes when scrolling up you see the causing error there.

answered
0

Have you solved this? If so please add your answer here or at https://forum.mendix.com/link/questions/104218. Thanks

answered
0

Mendix has released a new version of this course that no longer has this error.

answered