Skip to content

Error with native modules while NPM install'ing on a dev PC #4

Open
@djey47

Description

To allow installing on a raspberry PI, npm install scripts also compile native modules for the target environment (as serialport library requires native modules - serialport-bindings-cpp - to be present).

While finally working on a raspberry PI for MagicMirror, that breaks installation on a dev environment, e.g W10/11 with WSL2...

Either it has to removed for development, or a solution to build native modules has to be found on WSL2.

> [email protected] postinstall
> rm -rf node_modules/@serialport/bindings-cpp/prebuilds && node_modules/.bin/electron-rebuild -f -w @serialport/bindings-cpp


An unhandled error occurred inside electron-rebuild
Unable to find electron's version number, either install it or specify an explicit version

Error: Unable to find electron's version number, either install it or specify an explicit version
    at /home/djey/dev/MMM-LKY-TIC/node_modules/@electron/rebuild/lib/cli.js:94:19
npm ERR! code 255
npm ERR! path /home/djey/dev/MMM-LKY-TIC
npm ERR! command failed
npm ERR! command sh -c rm -rf node_modules/@serialport/bindings-cpp/prebuilds && node_modules/.bin/electron-rebuild -f -w @serialport/bindings-cpp

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions