Cannot find module uiid/v4 - R Pi Camera from Dashboard

I am having this issue which seems I am going nowhere with troubleshooting:
Can you help me?

I want to take pictures using "camerapi-takephoto node". But each time I set it, it gives me the error below:

Error: Cannot find module 'uuid/v4'
Require stack:

  • /home/pi/.node-red/node_modules/node-red-contrib-camerapi/camerapi.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js

Note: I did use terminal to take a photo and it was successful.
"raspistill -t 2000 -o image.jpg"

Did you install the additional modules? (

That tutorial is from 2017 so a lot may have changed. In the tutorial it says to modify the settings.js file.

  • which one did you modify?
  • what version of raspbian do you have installed?
  • what version of NR and node.js (you can find this in the NR start up log)

EDIT: Did you read thru the comments in that tutorial???

EDIT2: I just installed the node on a Pi B3 running stretch and it is working fine for me.

That's interesting, see Node-red-contrib-camerapi issue and the reply to it.

1 Like

:thinking: What can I say, I can't remember which Pi I tried it with before and what version of raspbian. And I'm not sure I installed the pre-reqs when I tested before.

I'll have to flash a new SD card with Buster and test it out. This time I was using Stretch.

This has been fixed in node-red-contrib-camerapi v0.0.39
You can get it by stoppng Node-RED and running the following

cd .node-red
npm install node-red-camerapi@0.0.39

Big thanks to the author of the node for addressing this so quickly!

1 Like

Version 0.0.40 now in the Flows library

I tried installation of specific version @0.0.39

But it doesn't seem working (same error remains).

I also tried this way before:

Another thing I realized is that when I edited settings.js file (Httpstatic), it doesn't create such directory in the home/pi directory.


  1. How did you do the update?
  2. What version of NR, node.js are you on? (see NR startup log)
  3. what os/version are you running on the Pi? (from the CLI enter cat /etc/os-release)
  4. reinstall so you pick up version 0.0.40
cd .node-red
npm remove node-red-camerapi
npm install node-red-camerapi

1- Stopped node-red and then used sudo npm install node-red-contrib-camerapi

2- It is all the latest version available. See picture.

3- It is raspbain latest from the website.

4- I will try and leave an update in here soon.

What model Pi are you running?


What model Pi? 3b, 4, pi zero?

Do you mean "node-red-contrib-camerapi"?

My bad. The Model is Zero W.

Ahhh that is an ARM-V6 whlle the 3B is ARM-V8. Both myself and the other peson with this issue are using 3B's and the update fixed the issue.

You should open an issue at and explain you are using a PiZero-w and see what the author has to say.


first: node-red-stop
1- I looked in every directory and deleted any type of camera module I had installed using:

npm uninstall
Also from pallete manager.

2- And I used again this method: (Important)

Testing Camera: $ raspistill -o image.jpg
You should see image.jpg in the pi directory using "ls" command.

Testing Python library: $ python3 -c "import picamera"
No errors.(already had installed)

3- Noting that in the previous efforts, I had changed the "settings.js" file's "HttpStatic" folder. (I am not sure it had effect on this step.)

4- install node-red-contrib-camerapi in the .node-red directory.

pi@mysolarserver:~/.node-red $ npm install node-red-contrib-camerapi

5- start node-red

6- wire nodes.
Note that I am using dashboard.(have it installed)

7- Template node: (needs some modification)


Take a photo

Finally, The httpStatic allows you access files inside the directory you indicate in it through "http://localhost:1880/image.jpg as an example; where image.jpg is in "/home/pi/mypictures/"

1 Like

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