Custom React widget - Unknow widget error when running application
Hi, I have been working on building custom react widgets in Mendix 8 and from yesterday afternoon they won’t load in the project where I am developing them, see the error below. However when I copy the mpk file from my development project to another project it works fine, see the second screenshot. I cleaned the deployment directory and also reopened the Mendix project but I still get the same issue. In Mendix, the widgets are visible in the toolbox, they seem to refresh when I modify them (for example, when I add inputs in the code I can see them in Mendix). Any idea what’s up there? I am able to test but I have to copy the mpk file to my other project to do so… it is becoming time consuming 😉 Thanks, Seb
And you do the dance:
“npm run dev” from command prompt
F4 in the modeler to synch the project directory
Update All Widgets?
Tim van Steenbergen
yes I do.
There was a time where after F4 my custom widget was not showing in the Toolbox but now it is.
And when I modify the list of inputs of my widget through the xml, I can see the change in the Mendix project. Still when it is running, it says the widget cannot be found.
Maybe check your widgets folder for extraneous widgets. If you changed the name of a widget or the package name, you might have an extra copy in there.
Other than that, you could try manually cleaning your deployment folder by deleting the web folder from it.
Those are the only the two places where widgets live at any point in your project directory.
I didn’t find extra items in the folder, and deleting the web folder didn’t work.
I removed the widgets from the page and noticed I was still getting the error when running it.
Not sure what the cause really was but I recreated a new page and now it works fine.