Open moFries opened 7 years ago
Same errors here :-(
Can anyone help us please?
@moFries i have the solution:
Go to the "modules/MMM-DHT-Sensor/" Folder and edit the "package.json" file as follow
replace the line #14
"postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron-prebuilt"
with this line:
"postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron"
and then do npm install
Another problem was that the module don't have permissions to read the values from dev/mem.
The solution for this is that you have to run MagigMirror as root
I use pm2 and have only changed the mm.sh script (added sudo command) as follows:
cd ~/MagicMirror DISPLAY=:0 sudo npm start
@XxXCobraXxX
Thx, it also works for me. But I didn't do sudo for the MM. I think it's better to do this to give the MM access to the GPIO:
sudo usermod -a -G gpio pi
@moFries that's right. MM with root permission are sure not a good solution.
I have deleted the sudo again from mm.sh, entered your line in the terminal and pm2 fails again with the permission from dev/mem.
Do you or anyone else have any idea?
Thx in advance
Same here! Help please. Regards,
@XxXCobraXxX I have added sudo
to mm.sh, but the MagicMirror is no longer start success
1|mm | Invalid MIT-MAGIC-COOKIE-1 key
1|mm | npm
1|mm | ERR! Linux 4.9.59-v7+
1|mm | npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
1|mm | npm
1|mm | ERR! node v6.13.0
1|mm | npm ERR! npm v3.10.10
1|mm | npm ERR! code ELIFECYCLE
1|mm | npm ERR! magicmirror@2.2.2 start: `sh run-start.sh`
1|mm | npm ERR!
1|mm | Exit status 1
1|mm | npm ERR!
1|mm | npm ERR! Failed at the magicmirror@2.2.2 start script 'sh run-start.sh'.
1|mm | npm
1|mm | ERR! Make sure you have the latest version of node.js and npm installed.
1|mm | npm ERR! If you do, this is most likely a problem with the magicmirror package,
1|mm | npm ERR!
1|mm | not with npm itself.
1|mm | npm ERR! Tell the author that this fails on your system:
1|mm | npm ERR! sh run-start.sh
1|mm | npm
1|mm | ERR! You can get information on how to open an issue for this project with:
1|mm | npm ERR! npm bugs magicmirror
1|mm | npm ERR! Or if that isn't available, you can get their info via:
1|mm | npm ERR! npm owner ls magicmirror
1|mm | npm ERR! There is likely additional logging output above.
1|mm | npm ERR! Please include the following file with any support request:
1|mm | npm ERR! /home/pi/MagicMirror/npm-debug.log
Hi there,
I had the same issue (electron-rebuild) After changing in package.json electron-rebuild with electron I had another issue :
electron-rebuild -e ../../node_modules/electron
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
make : on entre dans le répertoire « /home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rpi-dht-sensor/build »
CC(target) Release/obj.target/node_dht_sensor/src/bcm2835.o
CXX(target) Release/obj.target/node_dht_sensor/src/node-dht-sensor.o
In file included from /home/pi/.electron-gyp/8.5.3/include/node/node.h:63,
from ../src/node-dht-sensor.cpp:1:
/home/pi/.electron-gyp/8.5.3/include/node/v8.h:8923:75: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
^
/home/pi/.electron-gyp/8.5.3/include/node/v8.h:8931:78: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
^
../src/node-dht-sensor.cpp: In function ‘int initialize()’:
../src/node-dht-sensor.cpp:189:23: error: too few arguments to function ‘int bcm2835_init(int)’
if (!bcm2835_init())
^
In file included from ../src/node-dht-sensor.cpp:21:
../src/bcm2835.h:1008:16: note: declared here
extern int bcm2835_init(int);
^~~~
../src/node-dht-sensor.cpp: In function ‘void Read(const Nan::FunctionCallbackInfo~~
../src/node-dht-sensor.cpp:256:37: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int gpio = args[1]->Uint32Value();
^
In file included from /home/pi/.electron-gyp/8.5.3/include/node/node.h:63,
from ../src/node-dht-sensor.cpp:1:
/home/pi/.electron-gyp/8.5.3/include/node/v8.h:2818:47: note: declared here
V8_DEPRECATED("Use maybe version") uint32_t Uint32Value() const;
^~~
../src/node-dht-sensor.cpp:266:83: error: no matching function for call to ‘v8::Object::Set(v8::Local~~
../src/node-dht-sensor.cpp:294:37: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
GPIOPort = args[1]->Uint32Value();
^
In file included from /home/pi/.electron-gyp/8.5.3/include/node/node.h:63,
from ../src/node-dht-sensor.cpp:1:
/home/pi/.electron-gyp/8.5.3/include/node/v8.h:2818:47: note: declared here
V8_DEPRECATED("Use maybe version") uint32_t Uint32Value() const;
^~~
../src/node-dht-sensor.cpp: At global scope:
../src/node-dht-sensor.cpp:299:11: error: variable or field ‘Init’ declared void
void Init(Handle
I also had the same problem after renaming package.json "electron-rebuild" to "electron". It seems I can't make it work no matter how many times I tried or searchd for a "google" solution.
Hi together,
by running
npm install
it fails with the following message:Any ideas?