Custom Node in Ubuntu?

I have created a custom node that works well on my Windows 10 PC.

I am trying to install it on a Linux, Ubuntu 18.04.2 LTS with NR version 0.20.5
and NodeJS V 10.

I have installed my custom node via NPM, but I get the following error when NR starts:
[warn] [site-supervisor-login/20] Error: /home/odroid/.node-red/node_modules/site-supervisor-login/n does not exist.

I placed the folder with the custom node files in that folder. Why am I getting this error?

Also, I am not too familiar with Ubuntu vs. Windows.

Thanks...

you are calling n, is that installed ?

I had help from a Linux guy and since I copied the custom node files from Windows to Linux (Ubuntu in this case), I needed to do a file conversion because of the CR, LF in Windows. We used DOS2UNIX program to fix the files and it's now working fine...

1 Like

That is not the right way to install a node into that folder. Even though it worked in this instance, it misses all of the checks and installation steps. You need to use npm to install it. You can install from another folder on the device, from GitHub (or other git service) or from npm (having published it).

In regard to line endings. It is generally far better to ensure that you always use linux line endings which Windows generally understands just fine these days. I make sure that my code editors and git will always use them. I've been caught out too many times.

Oh, I did use NPM, no issue there, it was the windows files for the node (*.html and *.js) that were messed up with the line endings...