Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when install npm #7

Closed
rt400 opened this issue Apr 3, 2019 · 1 comment
Closed

error when install npm #7

rt400 opened this issue Apr 3, 2019 · 1 comment

Comments

@rt400
Copy link

rt400 commented Apr 3, 2019

hi ,
i have node 11 and when i install with this command : sudo npm install

npm WARN lifecycle Magic-Mirror-Module-Buttons@1.0.0~postinstall: cannot run in wd Magic-Mirror-Module-Buttons@1.0.0 electron-rebuild -e ../../node_modules/electron (wd=/home/yuval/Docker/MagicMirror/modules/MMM-Buttons)
audited 301 packages in 1.253s
found 0 vulnerabilities

and with this command : sudo npm -g install


> Magic-Mirror-Module-Buttons@1.0.0 postinstall /home/yuval/Docker/MagicMirror/modules/MMM-Buttons
> electron-rebuild


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

Error: Unable to find electron-prebuilt's version number, either install it or specify an explicit version
    at Object.<anonymous> (/home/yuval/Docker/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:81:19)
    at Generator.next (<anonymous>)
    at /home/yuval/Docker/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/yuval/Docker/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:4:12)
    at /home/yuval/Docker/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:70:8
    at Object.<anonymous> (/home/yuval/Docker/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:146:4)
    at Module._compile (internal/modules/cjs/loader.js:805:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
    at Module.load (internal/modules/cjs/loader.js:672:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! Magic-Mirror-Module-Buttons@1.0.0 postinstall: `electron-rebuild`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the Magic-Mirror-Module-Buttons@1.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/yuval/.npm/_logs/2019-04-03T11_35_21_386Z-debug.log
@MuellerNicolas
Copy link

I ran into a quite similar issue.
In my case i fixed it by manually installing npm install electron --save-dev inside the projects folder.
And after that setting the directory / postinstall line in the package.json file:
from
postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron
to
postinstall": "node_modules/.bin/electron-rebuild -e node_modules/electron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants