Can't find module mraa

Hi,

I am getting some errors when starting Node-red. Here is it:
[node-red-node-intel-gpio/mraa-gpio-ain] Error: Cannot find module ‘mraa’ (line:3)
[warn] [node-red-node-intel-gpio/mraa-gpio-din] Error: Cannot find module ‘mraa’ (line:3)
[warn] [node-red-node-intel-gpio/mraa-gpio-dout] Error: Cannot find module ‘mraa’ (line:3)
[warn] [node-red-node-intel-gpio/mraa-gpio-pwm] Error: Cannot find module ‘mraa’ (line:3)

I had a similar problem with moment and I fixed it by adding “moment”: “^2.14.1” to my package.json and then I did: npm install.
Now I am trying to do something similar with mraa, but it is not working. I still get the same error. Any suggestions?

Thanks in advance
Dhiaa

did you read the note about the node ?

Yes, I did. I tried to install mraa, but it didn't work. I am getting errors. See the attached picture.

  1. you don’t show the entire log from when you start the install
  2. the log is telling you to make sure of something. Did you? nd what is the answer to what it is telling you to do.

(I’m deliberately making you look at the information you provided so you can learn how to solve your own problem)

Thank you for replying.
I post here when I’ve tried almost everything I can. The log tells me to make sure node is updated and npm are installed. All of that are done, still get the same errors when trying to install mraa, so actually I don’t think the log messages tell exactly where the problem lies.

so what versions of node.js and NPM are you on?
Also what version of NR?

and what version of the mraa libraries do you have installed?

node: v10.4.1
npm: 3.5.2
nr? what is it?

You’ve missed answering what version of the mraa libraries do you have installed

nr = Node-RED

Sorry, I didn’t know. Node red version: v0.18.7. I have’t installed mraa yet, bro. This is what I am asking about.

No I'm talking about the mraa libraries not the mraa node.js package

You said you had tried almost everything you can.

I would start by re-reading the ReadME for the node, linked to in the second post. It asks you to check that you have the latest version of the mraa libraries installed.

Ensure the latest version of mraa libraries are installed

It might also be worth checking the mraa readme on npmjs for any other requirements.

1 Like

Hi, i have also tried already to install MRAA on a Raspi PI, for use in NR but with no success so far.
main problem has been failing to install it locally, the need then to install MRAA global, and then for some reason the mraa "require" failed to work..
i would like then to run now a clean installation again. is there any procedure you could suggest before i end-up in some other end point?
i'm going to use using latest node version and NR 0.19.3

Thanks

M

What is the end result you are trying to get to ? (Do you really need to use mraa ? - do you just need gpio ? or does mraa give you something extra ?)

Not really required..... however we use an i2C air quality sensor MICSV89 for which are available UPM/MRAA libraries so we hoped to quickly test that way...also there are other UPM libraries for a large number of sensors... while there is a lack in NR... just a few available
end result is of course possibly to do not use MRAA just for that, but you know...
certanlly is a shortcut to make evaluation tests, or in the end could also be a ready way to make wider the IOT scope of NR.

Ah right so yes - getting mraa working would be rather useful.