UIBUILDER package.json error

Oh, strange! I think that must have cropped up at some previous point in your experiments. Since uibuilder does its best to preserve that file (in case you choose to install dependencies outside of Node-RED), that property has been retained.

Of course, that error property should never have been written into the file in the first place so that is a minor bug somewhere. The error comes from the npm ls command so at some point you had an issue with an installed package which might have happened for all sorts of reasons. The error should have been logged rather than ending up in the JSON file! :smiley:

I think that if you remove the whole error property from the file (best to close node-red to be safe, then manually edit the file and restart node-red - overkill but better safe than sorry). It should not reappear but let me know if it does.

I've some work to do on the library manager anyway now that I've just added the new feature in 7.5 that now lets you run npm scripts defined in the package.json file in your uibuilder instance root. This is to allow things like build scripts to be run if you want to optimise code or use a front-end framework that requires a build such as Svelte or REACT. In doing that work, I discovered some new ways of being able to wrap async calls in a way that works with ExpressJS allowing data to be carried across multiple async calls. Perfect for handling npm runs. That has allowed me to grab npm command outputs as a returned http stream back into the Editor.

So I may want to do something similar for the library manager - which uses my same library functions. So it will be easier to see what is going on when you install/update/remove front-end libraries. Not sure if that will make it into v7.5 though, probably will wait till v7.6.

Anyway, thanks for spotting and reporting that. I will make a note to see if I can track down where it might happen. Anyway, the good news is that it should have no impact on Node-RED or uibuilder. :smiley:

1 Like