2

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?

Piotr Kula
  • 17,307
  • 6
  • 65
  • 104
  • Hi - Looks like you need to install node 48 to get that to work or upgrade that module to one which was built against 51 – Piotr Kula Jan 05 '17 at 21:40
  • Or, do as the instructions suggest, rebuild the module (which apparently contains native code) for your particular version. – jfriend00 Jan 05 '17 at 23:08

2 Answers2

1

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

SDsolar
  • 2,348
  • 8
  • 25
  • 43
0

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.

not2qubit
  • 1,407
  • 2
  • 14
  • 23