webtorrent / webtorrent-desktop

❤️ Streaming torrent app for Mac, Windows, and Linux
https://webtorrent.io/desktop
MIT License
9.74k stars 1.01k forks source link

`npm start` does not start on Debian Node v11 #1600

Closed jcalfee closed 5 years ago

jcalfee commented 5 years ago

npm start on master does not produce any UI and gives me an error.

What version of WebTorrent Desktop? (See the 'About WebTorrent' menu)

What operating system and version? Debian Stretch $ node -v v11.6.0

What did you do? npm start

What actually happened?

$ npm start

> webtorrent-desktop@0.20.0 start /home/james/opt/webtorrent-desktop
> npm run build && electron .

> webtorrent-desktop@0.20.0 build /home/james/opt/webtorrent-desktop
> buble src --output build

Missing config file: Creating new one
A JavaScript error occurred in the main process
Uncaught Exception:
/home/james/opt/webtorrent-desktop/node_modules/cp-file/index.js:60
        ...options
        ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at setupStateSaved (/home/james/opt/webtorrent-desktop/build/renderer/lib/state.js:114:16)

Node kept running but the UI did not show up.

Maybe package.json needs some babel-polyfill?

Muhnad commented 5 years ago

same on Mac

Muhnad commented 5 years ago

Okay, I just fixed it by downloading the Production app and open it :D

I don't know why this happening but I think its something related by configuration checks the state.js file on render folder line 60 there is a long comment talking about that.

https://github.com/webtorrent/webtorrent-desktop/blob/master/src/renderer/lib/state.js#L60

skpulipaka26 commented 5 years ago

I am facing the same issue on mac @Muhnad Can you please explain what you mean by production app? Is it on a different branch?

Muhnad commented 5 years ago

Just download the app from website and run it.

Then run the code. That's what I did and worked with me.

On Mon, Jun 10, 2019, 9:01 PM Pulipaka Sai Krishna notifications@github.com wrote:

I am facing the same issue on mac @Muhnad https://github.com/Muhnad Can you please explain what you mean by production app? Is it on a different branch?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/webtorrent/webtorrent-desktop/issues/1600?email_source=notifications&email_token=ADGIXNE47XFJXECM6762BZDPZ2QHPA5CNFSM4HVPCQX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXK4ESA#issuecomment-500548168, or mute the thread https://github.com/notifications/unsubscribe-auth/ADGIXNANKM3SREBDTMAI5DTPZ2QHPANCNFSM4HVPCQXQ .

skpulipaka26 commented 5 years ago

Thank you, that works

Siilwyn commented 5 years ago

Same on Ubuntu 19.04!

jcalfee commented 5 years ago

Also tried yarn install with node v11. Sometimes electronjs does better under yarn. Did not work though.. Same error under node v9 and v10..

jcalfee commented 5 years ago

Got it working under node v11 .. I went to the latest release tag..

$ git checkout tags/v0.20.0
HEAD is now at fbb3fa6... 0.20.0
$ npm install
...
$ npm start

This is still an issue on master.

hicom150 commented 5 years ago

For me master work great in this scenarios

Giving that node 8 and node 10 are the stable LTS versions and node 12 the current one, could you try with this releases of node in case of we can recover more info... 😉

jcalfee commented 5 years ago

Same error under node v10..

feross commented 5 years ago

@jcalfee Are you sure that you're running Node 10? And error parsing ...options indicates that you're using an old version of Node.js (likely older than Node 8). You can check the version you're using with:

which node
node --version
feross commented 5 years ago

Nevermind. The issue is coming from Electron. You may be using an outdated electron version. What do you get when you run this:

npm ls electron

You might also want to try once more using the latest code from the master branch as we've just updated to Electron 4. But it worked for me with electron@1.8.8 before updating too.

jcalfee commented 5 years ago
$ npm ls electron
webtorrent-desktop@0.20.0 /home/james/opt/webtorrent-desktop
└── electron@1.8.8 
jcalfee commented 5 years ago

I did a pull on master and although npm ls electron still reports electron@1.8.8, npm start works now. Thank you..

feross commented 5 years ago

Great. Glad you got it figured out!