ewnd9 / record-desktop

:movie_camera: Effortless GIFs and screenshots on Linux, built with Electron.
66 stars 7 forks source link

Error: Cannot find module 'electron-prebuilt' #29

Closed nskazki closed 7 years ago

nskazki commented 7 years ago

My current env is:

$ uname -a
Linux xyn 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ node -v
v6.11.0
$ npm -v
3.10.10

I just installed deps and app, but got an unexpected error on launch:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install slop imagemagick byzanz -y
$ npm install record-desktop -g
$ record-desktop 
module.js:471
    throw err;
    ^

Error: Cannot find module 'electron-prebuilt'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/nskazki/.nvm/versions/node/v6.11.0/lib/node_modules/record-desktop/app.js:3:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
return: 1
nskazki commented 7 years ago
$ cd /home/nskazki/.nvm/versions/node/v6.11.0/lib/node_modules/record-desktop/
$ git branch
* (HEAD detached at v0.33.2)
$ npm i electron-prebuilt
$ node app.js 
Error launching app
Unable to find Electron app at /home/nskazki/.nvm/versions/node/v6.11.0/lib/node_modules/record-desktop

Cannot find module '/home/nskazki/.nvm/versions/node/v6.11.0/lib/node_modules/record-desktop'

I do not know what to do :)

nskazki commented 7 years ago

I also tried this https://github.com/ewnd9/record-desktop/issues/27#issuecomment-297010794 but with npm i electron-prebuilt before npm run build and it looks like your app is working now :) image

ewnd9 commented 7 years ago

Thanks for finding the time. I've published v0.5.7 with fixes and ensured that both npm and deb distribution are working ok.