Node won't install, please help

I am having similar issue here with installing node-red-contrib-raspihats
here is what I am noticing:
2019-06-04T21:42:54.436Z [err] npm
2019-06-04T21:42:54.437Z [err] ERR! path /home/pi/.node-red/node_modules/function-plot
It seems that the npm is trying to locate this folder unsuccessfully. I looked in my pi and sure enough this folder do not exist. My .node-red folder is located in ~/ and not in ~/pi/
Not sure how to correct this yet!

Can you copy/paste the npm command you are running and the full output please.
Also run npm -v and node -v
The default location of the .node-red folder is ~/.node-red. Usually this is /home/pi/.node-red, do you mean you are running as a user other than pi? If so then it should be /home/username/.node-red.

Here is the version info:
pi@raspberrypi:~ $ npm -v
6.9.0

pi@raspberrypi:~ $ node -v
v8.11.1

My command is
pi@raspberrypi:~/.node-red $ npm install node-red-contrib-raspihats
npm ERR! path /home/pi/.node-red/node_modules/function-plot
npm ERR! code EISGIT
npm ERR! git /home/pi/.node-red/node_modules/function-plot: Appears to be a git repo or submodule.
npm ERR! git /home/pi/.node-red/node_modules/function-plot
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-06-15T13_00_56_904Z-debug.log

Never mind the path comment from my post, that was a mix up from my part. I am using the user 'pi'

Try deleting this folder: /home/pi/.node-red/node_modules/function-plot manually with

rm -r /home/pi/.node-red/node_modules/function-plot

Then reinstalling node-red-contrib-raspihats. If that doesn't work, you probably need to raise an issue against that node.

1 Like

This did work! Thank you
I deleted that folder
rm -r /home/pi/.node-red/node_modules/function-plot
Then I installed the node from the node pallet.
Cheers!