Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find electron-prebuilt's version number. - When trying to use electron-rebuild

I am trying to use bluetooth-serial-port native module in electron (atom-shell). I did the following.

  1. Installed electron-prebuilt.

npm install electron-prebuilt -g npm install electron-prebuilt --save-dev

  1. Installed electron-rebuild

npm install --save-dev electron-rebuild

  1. Installed bluetooth-serial-port

npm install bluetooth-serial-port --msvs_version=2013

  1. Running electron-rebuild command.

./node_modules/.bin/electron-rebuild

and I am getting the following error.

Unable to find electron-prebuilt's version number, either install it or specify an explicit version"

Can anyone help?

like image 719
Janarthanan Avatar asked May 07 '15 23:05

Janarthanan


3 Answers

Install the electron-prebuilt on the same folder level.

like image 177
Janarthanan Avatar answered Nov 15 '22 14:11

Janarthanan


In the root folder of your project, use this:

node_modules/.bin/electron -v

If you're on a Windows machine, use back slashes in the path.

node_modules\.bin\electron -v

This is what mine looks like: v0.28.3

like image 33
akamaozu Avatar answered Nov 15 '22 12:11

akamaozu


You can see your electron version number by running electron with no arguments..

Example:

cd ./my_project
npm install --save-dev electron-prebuilt
node_modules/.bin/electron

You should get a little welcome notice that displays your version number.

If you've installed electron pre-built globally, just run the 'electron' command for the same result.

like image 1
Iron Gremlin Avatar answered Nov 15 '22 14:11

Iron Gremlin