Custom node not appear in the category

Hi, I have created a custom node and installed it in nodered. It appears in manage-pallette but not in the category.

my package.json

{
    "name" : "node-red-contrib-simulation-quantity-add",
    
    "node-red" : {
        "nodes": {
            "quantity-add": "quantity-add.js"
        }
    }
}

quantity-add.html:

<script type="text/javascript">
    RED.nodes.registerType('quantity-add',{
        category: 'function',
        color: '#a6bbcf',
        defaults: {
            name: {value:""},
            type: {value:""}
        },
        inputs:1,
        outputs:1,
        icon: "file.png",
        label: function() {
            return this.name||"quantity-add";
        }
    });


</script>

<script type="text/html" data-template-name="quantity-add">
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
    <div class="form-row">
        <label for="node-input-type"><i class="fa fa-tag"></i> Quantity type</label>
        <input type="text" id="node-input-type" placeholder="Type">
    </div>
</script>

<script type="text/html" data-help-name="quantity-add">
    <p>A digitalTwin simulation's custom node for adding quantity</p>
</script>

quantity-add.js :

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);
}

where does it appear then - please show or explain


As you can see its installed successfully but does not appear in the function category

How is the node installed - from NPM? or from symlink or other? Was it a --global install?

If symlinked in node_modules...

  • ensure modifications are changed
  • restart node-red
  • try refreshing (hard cache clearing refresh)
  • try searching the left hand palette for quantity

npm install C:\Users\golamk.node-red\custom\quantity-add

I tried all of the suggestions but they didn't work for me

Maybe you can try:
npm pack within your projects root folder, then upload the result using the upload module function?

Might be worth taking it out of Node RED first?
The only factor I can see is the method of install.

  • 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?