module.exports = function (RED) {
function QuantityAddNode(config) {
RED.nodes.createNode(this, config);
var node = this;
var type = config.Type;
node.on('input', function (msg) {
node.send(type);
});
}
RED.nodes.registerType("quantity-add", QuantityAddNode);
}
Are there any errors in the node-red console when you start node-red?
Try adding a palletLabel property to the node
Have you tried the search box in the palette?
What if you set a different category?
Are there any errors in the browser console?
Try adding console.log("hi from my node, I am just above RED.nodes.registerType('quantity-add'...") and console.log("hi from my node, I am inside the label() function")
where is quantity-add.js in relation to package.json?
Your modules folder should be structured as follows.
Note: Its a personal choice, that I put the guts of the package In a nodes folder, but I (don't think) its a requirement - as long as package.json correctly references the location of the main entry point.
The icons folder, should be in the same location as your html & js file
if all this checks out, within your packages directory (in my example above that will be quantity-add)
run npm pack and upload it via the User Interface.
(once again - it may be better to remove any trace of it thus far from node red)
The only thing that is sticking out at me, is your method of install.
No, it is fine and means that you only need to restart node-red if there is a change to the source. I do that automatically via PM2 with defined watch folders.
I develop on Windows and run on Linux.
Also, slight update to your package.json example. It should include an "engines" property to show the minimum version of node.js supported.