Not that simply. nodegen works either from an existing function node - or a swagger definition file - or a web of things definition file. There are plans to try to make subflows exportable as nodes also - but that is still a plan. Until then, you will need to do the wrapping / creation yourself. https://nodered.org/docs/creating-nodes/first-node
hmm - If I save a function as it says then run the command as it says - it creates a node OK... admittedly it calls it node-red-contrib-unnamed-function but is created in the directory you run the command in... so should be easy to find and edit from there.
But yes adding the name parameter up front would make it easier, and less editing later.
I am using windows 8.1. Without passing name it didn't work for me. Also i tried in linux, did not work without name. Again in window 8.1 it appeared in palette manager but not in nodes panel where all nodes are listed. This is super node for my need, but these issues stops me from using, still struggling to make it work.
I think you did some contract work for us a few years ago.
If you don't publish the nodes to NPM and install through the package manager pallet in node red, your custom made nodes do not get added to the package.js in the node red folder. I think the purpose of this is to stop malware sneaking into your node red instance.
So your home made nodes wont be picked up.
To get around this you have to add your custom node to the package.js file in the node red folder.
Add your node name and make sure the versioning is correct.
Some times its better to first add the node details to the package.js then add your node-red-contrib-MyHomeMadeNode to the relevant node red folder.
Restart node red it should be good to go.
Tip, when using nodered-gen tool, give the function block a name, the tool will use this name as the package name.
Did you follow my steps ? You have to manually add the dependency to the node to the Node-Red Package.js file ?
When i say manually i mean you have to physically type/enter the node details to that file.