My very first Raspberry and I want to install the smart-mirror
.
When running npm start
, it launches the home screen but also this error:
Error: The module '/home/pi/smart- mirror/node_modules/grpc/node/extension_binary/grpc_node.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 51. Please try re-compiling or re-
installing the module (for instance, using 'npm rebuild' or 'npm install')
I tried both but ending up with the same error.
How do I fix it?
-
Hi - Looks like you need to install node 48 to get that to work or upgrade that module to one which was built against 51Piotr Kula– Piotr Kula2017年01月05日 21:40:59 +00:00Commented Jan 5, 2017 at 21:40
-
Or, do as the instructions suggest, rebuild the module (which apparently contains native code) for your particular version.jfriend00– jfriend002017年01月05日 23:08:48 +00:00Commented Jan 5, 2017 at 23:08
2 Answers 2
This command will help you make sure curl is installed on your device
curl -sL https://raw.githubusercontent.com/evancohen/smart-mirror/master/scripts/pi-install.sh | bash
Node is always outdated on any Rpi distribution. (Because of backward compatibility, fast development cycles of Node, and somewhat lazy maintenance efforts by the Rpi org.)
So you need to update it manually and that is not trivial as you need to remove a few node packages with package manager (apt
) first and then re-install them with npm
. Follow the instructions in my post here.