question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

errors with npm run electron-rebuild

See original GitHub issue

Hi, trying to run npm run electron-rebuild but am having some issues.

Does anyone have any suggestions?

TIA

Output of command here:

pi@raspberrypi  ~/MagicMirror/modules/MMM-awesome-alexa   master  npm run electron-rebuild

> mmm-awesome-alexa@1.0.0 electron-rebuild /home/pi/MagicMirror/modules/MMM-awesome-alexa
> electron-rebuild --pre-gyp-fix

✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
make: Entering directory '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/build'
  CXX(target) Release/obj.target/snowboy/swig/Node/snowboy.o
  SOLINK_MODULE(target) Release/obj.target/snowboy.node
/usr/bin/ld: cannot find -lcblas
collect2: error: ld returned 1 exit status
snowboy.target.mk:130: recipe for target 'Release/obj.target/snowboy.node' failed
make: Leaving directory '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/build'
make: *** [Release/obj.target/snowboy.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 4.14.27-v7+
gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.15" "--arch=arm" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/electron-v1.4-linux-arm" "--remote_path=./snowboy/v1.2.0/Release/" "--package_name=snowboy-v1.2.0-electron-v1.4-linux-arm.tar.gz" "--host=https://snowboy-release-node.s3-us-west-2.amazonaws.com"
gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy
gyp ERR! node -v v6.13.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Failed with exit code: 1

Error: make: Entering directory '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/build'
  CXX(target) Release/obj.target/snowboy/swig/Node/snowboy.o
  SOLINK_MODULE(target) Release/obj.target/snowboy.node
/usr/bin/ld: cannot find -lcblas
collect2: error: ld returned 1 exit status
snowboy.target.mk:130: recipe for target 'Release/obj.target/snowboy.node' failed
make: Leaving directory '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/build'
make: *** [Release/obj.target/snowboy.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 4.14.27-v7+
gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.15" "--arch=arm" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/electron-v1.4-linux-arm" "--remote_path=./snowboy/v1.2.0/Release/" "--package_name=snowboy-v1.2.0-electron-v1.4-linux-arm.tar.gz" "--host=https://snowboy-release-node.s3-us-west-2.amazonaws.com"
gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy
gyp ERR! node -v v6.13.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/spawn-rx/lib/src/index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:239:16)
    at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:198:26)
    at Subscriber._error (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:129:26)
    at Subscriber.error (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:103:18)
    at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:129:26)
    at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:103:18)
    at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/spawn-rx/lib/src/index.js:251:65)
    at SafeSubscriber.__tryOrSetError (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:248:16)
    at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/rxjs/Subscriber.js:188:27)

npm ERR! Linux 4.14.27-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "electron-rebuild"
npm ERR! node v6.13.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! mmm-awesome-alexa@1.0.0 electron-rebuild: `electron-rebuild --pre-gyp-fix`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the mmm-awesome-alexa@1.0.0 electron-rebuild script 'electron-rebuild --pre-gyp-fix'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mmm-awesome-alexa package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-rebuild --pre-gyp-fix
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mmm-awesome-alexa
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mmm-awesome-alexa
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/MagicMirror/modules/MMM-awesome-alexa/npm-debug.log
```

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dolanmiucommented, Mar 24, 2018

You dont have lcblas, which is libatlas:

The readme told you to install lib atlas, so its strange it doesnt work if you installed it already.

Anyway, try doing this:

sudo apt-get install libmagic-dev libatlas-base-dev

Sources:

https://askubuntu.com/questions/319167/cannot-find-lcblas-ubuntu-12-10 https://github.com/Kitt-AI/snowboy/issues/212

0reactions
chaosjestercommented, Mar 26, 2018

You dont have lcblas, which is libatlas:

The readme told you to install lib atlas, so its strange it doesnt work if you installed it already.

Anyway, try doing this:

sudo apt-get install libmagic-dev libatlas-base-dev

Ah whoops, must have missed that step, sorry. that has worked, please close.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't resolve electron-rebuild errors · Issue #2531 - GitHub
I'm trying to run my app with blake2 module installed. ... These are the steps I followed: install electron-rebuild package; remove blake2 folder ......
Read more >
An unhandled error occurred inside electron-rebuild
Option 1 Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows ...
Read more >
electron-rebuild - npm
Electron supporting package to rebuild native node modules against the currently installed electron. Latest version: 3.2.9, last published: ...
Read more >
Native Node Modules | Electron
When in doubt, run electron-rebuild first. Make sure the native module is compatible with the target platform and architecture for your Electron app....
Read more >
"npm run electronRebuild" failed on Joplin-2.6.10 - Development
For more information, rerun with the DEBUG environment variable set to "electron-rebuild". Error: C:\Program Files (x86)\MSBuild\14.0\bin\ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found