Very Basic Question [Solved]

I am trying to start developing my own node. I copied the information from Creating your first node https://nodered.org/docs/creating-nodes/first-node
I got through this part of the instructions:
In your node-red user directory, typically ~/.node-red , run:

npm install <location of node module>

I then expected to be able to go into NR and add the lower-case node. Even after restarting NR (not clear that I had to, but I understood I should and so did so out of an abundance of caution), the node is not showing as an available option.

I looked inside my node_modules directory and I see the symbolic link that the instructions said would be created:

lrwxrwxrwx    1 node-red node-red        21 May 19 15:56 debugexample -> ../../CS/DebugExample

I am now at a loss on what I have done wrong. Any suggestions?

The solution as shown below was to follow the directions and actually add the

    "node-red" : {
        "nodes": {
            "lower-case": "lower-case.js"
        }

to the npm init generated package.json, just as the directions on the first-node web page said to do.

Have your refreshed your browser? (or reopened 127.0.0.1:1880)
Do you have the "node-red": {"nodes": {"debugexample": "pathWithinYourModule.js"}} in the package.json?

1 Like

I have refreshed my browser. When I look in my package.json I see this:

{                                                                                                                     
    "name": "node-red-project",                                                                                       
    "description": "A Node-RED Project",                                                                              
    "version": "0.0.1",                                                                                               
    "private": true,                                                                                                  
    "dependencies": {                                                                                                 
        "debugexample": "file:../CS/DebugExample",                                                                    
        "node-red-contrib-actionflows": "~2.0.3",                                                                     
        "node-red-contrib-advanced-ping": "~1.2.0", 

Of course it shows many other nodes, but the one I created is listed first.

I meant the package.json of your new node, maybe post that here

It was not. I wonder what part of

Once generated, you must added a node-red section:
I couldn't read.

:slight_smile:
Issue solved?

1 Like

Yes. Thank you. As I suspected it was something very straightforward once I had my attention pointed to it.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.