Hello All,
Greetings!!
I am going through link https://nodered.org/docs/creating-nodes/first-node and trying to create my first custom node here. Steps I followed are:
1- Created a new directory named "custom_modules" in my node-red path "/home/ubuntu/.node-red/" to keep my custom nodes there.
2- created html, js files as per tutorial.
3- Then I ran sudo npm init
command whose output is as follows:
sudo npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (custom_modules) node-red-contrib-example-lower-case
version: (1.0.0)
description:
entry point: (lower-case.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /home/ubuntu/.node-red/custom_modules/package.json:
{
"name": "node-red-contrib-example-lower-case",
"version": "1.0.0",
"description": "",
"main": "lower-case.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this OK? (yes) yes
4- Then I ran
sudo npm install /home/ubuntu/.node-red/custom_modules
npm WARN node-red-contrib-example-lower-case@1.0.0 No description
npm WARN node-red-contrib-example-lower-case@1.0.0 No repository field.
up to date in 0.486s
I restarted node-red service but when I go to UI side I can't see my custom node added.
Could you please do guide here, will be grateful.
Thanks,
R. Singh