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

4

16

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?

Interrogatory answered 7/5, 2015 at 23:41 Comment(0)
I
5

Install the electron-prebuilt on the same folder level.

Interrogatory answered 8/5, 2015 at 0:3 Comment(2)
I installed both with npm install --save-dev, yet I have the same error.Cavitation
I have the same issue. Folder level isn't the issue i thinkQuinte
H
2

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

Horsa answered 30/3, 2016 at 20:55 Comment(0)
L
1

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.

Lusterware answered 17/2, 2016 at 0:30 Comment(0)
D
1

I found my electron version by running npm list electron:

`-- [email protected]

Then I specified the version number in the command: ./node_modules/.bin/electron-rebuild -f -w 26.0.0

This solved the issue for me.

Dominicdominica answered 16/8, 2023 at 7:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.