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

**URL:** <https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223>\
**Category:** Dashboard\
**Created:** [25 May 2020 00:39 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223 "2020-05-25T00:39:28Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [25 May 2020 00:39 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/1 "2020-05-25T00:39:28Z")

</div>

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"

> **[Node-RED Raspberry Pi Camera (Take Photos) | Random Nerd Tutorials](https://randomnerdtutorials.com/node-red-with-raspberry-pi-camera-take-photos/)**
>
> In this project we're going to take photos with Node-RED using the Raspberry Pi Camera Module V2. We're using this application to monitor our 3D printer.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 May 2020 08:49 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/2 "2020-05-25T08:49:57Z")

</div>

Did you install the additional modules? ([https://flows.nodered.org/node/node-red-contrib-camerapi](https://flows.nodered.org/node/node-red-contrib-camerapi))

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 May 2020 09:59 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/3 "2020-05-25T09:59:00Z")

</div>

That's interesting, see [Node-red-contrib-camerapi issue](https://discourse.nodered.org/t/node-red-contrib-camerapi-issue/25983) and the reply to it.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 May 2020 10:08 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/4 "2020-05-25T10:08:19Z")

</div>

🤔 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.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [28 May 2020 11:15 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/5 "2020-05-28T11:15:25Z")

</div>

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

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

```

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [28 May 2020 11:51 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/6 "2020-05-28T11:51:52Z")

</div>

Version 0.0.40 now in the Flows library

---

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [29 May 2020 03:32 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/7 "2020-05-29T03:32:38Z")

</div>

I tried installation of specific version @0.0.39

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

I also tried this way before:[https://randomnerdtutorials.com/node-red-with-raspberry-pi-camera-take-photos/](https://randomnerdtutorials.com/node-red-with-raspberry-pi-camera-take-photos/)

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/b/4bacf9e930d270a4e65c91a236fc1280765a0114.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6ea9206086f7a40b1b2fd5f556d5fdc17c81ce25.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 May 2020 09:47 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/8 "2020-05-29T09:47:55Z")

</div>

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

```auto
cd .node-red
npm remove node-red-camerapi
npm install node-red-camerapi

```

---

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [29 May 2020 22:26 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/9 "2020-05-29T22:26:58Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d70cae23a61f418c087d835c0ada4ca009b44d39.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 May 2020 22:39 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/10 "2020-05-29T22:39:40Z")

</div>

What model Pi are you running?

---

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [29 May 2020 22:40 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/11 "2020-05-29T22:40:40Z")

</div>

> [@zenofmud](#):
>
> `cat /etc/os-release`

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/907f06d5d6e507061953145f1555702b83b7907f.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 May 2020 22:42 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/12 "2020-05-29T22:42:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [29 May 2020 22:45 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/13 "2020-05-29T22:45:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [29 May 2020 22:46 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/14 "2020-05-29T22:46:26Z")

</div>

My bad. The Model is Zero W.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 May 2020 23:11 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/15 "2020-05-29T23:11:54Z")

</div>

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 [https://github.com/O-Hahn/node-red-contrib-camerapi](https://github.com/O-Hahn/node-red-contrib-camerapi) and explain you are using a PiZero-w and see what the author has to say.

---

<div class="post-metadata">

**Author:** ![MrEngineer1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrengineer1/32/22693_2.png) [@MrEngineer1](https://discourse.nodered.org/u/MrEngineer1)\
**Post date:** [30 May 2020 00:49 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/16 "2020-05-30T00:49:14Z")

</div>

Solved!

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)  
[https://nodepy-docs.readthedocs.io/en/latest/picamera-start.html](https://nodepy-docs.readthedocs.io/en/latest/picamera-start.html)

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](http://localhost:1880/image.jpg) as an example; where image.jpg is in "/home/pi/mypictures/"

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c0d1e427ed4d4d3393758e52592f153642c5ac1b.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8fa938b8f8edd3d700b522e9ab6c1ba403b52c92.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 June 2020 00:49 UTC](https://discourse.nodered.org/t/cannot-find-module-uiid-v4-r-pi-camera-from-dashboard/27223/17 "2020-06-13T00:49:19Z")

</div>

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