[New Release] node-red-contrib-uibuilder - v3.1.3

I'm not at a computer at the moment so can't look into this properly today... But... Did you try require.resolve(Vue\deep-path\to-what-I-need)

We are going off at a tangent here. My main issue is the other one right now and that doesn't need resolve, it needs a way to install one package from the installation of another.

But to answer your question, yes. It is actually documented in the npm documentation that resolve requires the package to have main defined.

Of course, npm moves on so who knows whether this is still an issue. All I know is that it wasn't reliable and I found several well-known front-end libraries that didn't have it and so couldn't be resolved. It drove me made for a while trying to track that down.

360截图1872012010388102 > Blockquote
我想问一下 admin输出的数据 经过函数处理后 admin能否获得函数返回的数据,如果能,该如何获得

The majority of the forum users do not speak Chinese.
You will get better support if you use the English language.
Most non-english speakers use Google Translate.

Google Translate gave me this:

I want to ask whether the data output by admin can be obtained by the function after the function is processed, and if so, how can it be obtained?

You have already seen that you can loop the messages returned by uibuilder back to the input. To get a message out of your front-end code, you use the uibuilder.send(msg) function in your front-end code.

The second output from the uibuilder node automatically sends messages based on events. The key ones being when a browser tab connects and disconnects. In the future, there will be others related to security.

Ok, I setup a test locally and I'm afraid that I couldn't get npm install within a post install script to work either.
If this was a normal package install from the command line you could have a post install script that printed a message telling the user to run something like npx setup-uibuilder-example which would do all that was necessary. The disadvantage of a post install script is of course that the dependencies will be re-added each time the package is updated which isn't great.
Another option might be to do the install from the node red ui. It could figure out if vue is needed and offer to install it in the property panel. That wouldn't matter if it's async.

Sorry I couldn't be more help.

Phew, well at least it wasn't just me!

Indeed. What I may do is to build something into uibuilder itself such that when you add your first node to a flow, it gives you a notification. I might even be able to drive the install at that point - after all, I already have an installed built into uibuilder. I would just need to make sure you don't keep getting the message.

That is true though it could be worked around.

Oops, I should have read to the end of your post before my previous bit of text saying the same thing :grinning_face_with_smiling_eyes:

Not a problem at all, I'm pleased that someone took the trouble to look. At least now I know to stop wasting my time and focus on something more productive. Thanks.

1 Like