Closed ploth closed 5 years ago
Version of electron would be handy here.
$ npm install electron
> electron@4.0.0 postinstall /home/ploth/projects/riot-web/node_modules/electron
> node install.js
npm WARN slate@0.41.3 requires a peer of immutable@>=3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN slate-html-serializer@0.6.32 requires a peer of immutable@>=3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN slate-plain-serializer@0.6.33 requires a peer of immutable@>=3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN slate-prop-types@0.4.67 requires a peer of immutable@>=3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN slate-react@0.18.11 requires a peer of immutable@>=3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@2.1.1 (node_modules/7zip-bin-win):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.1.1: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@1.0.1 (node_modules/7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ electron@4.0.0
updated 1 package and audited 21124 packages in 10.952s
found 5 vulnerabilities (4 low, 1 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
Try with electron 3, 4 is brand new and has removed that API. The change has already been merged to develop to stop using that removed API so you could equally switch branch. Though seeing some talk this morning I'm not sure if riot supports the brand new electron 4 in other ways yet, pending on a PR being released on their end
Works with electron 3.0.13. Thank you!
npm install electron@3
Hello,
It doesn't work for me with electron 3.1.1. What should I do ?
You can try to install the 3.0.13 version which is working for me.
npm install electron@3.0.13
Where should I run this command ?
In fact it seems to be already 3.0.13…
Do you have the same error once I had?
I have this:
Unhandled exception TypeError: app.makeSingleInstance is not a function at Object.
(/opt/Riot/resources/app/src/electron-main.js:103:24) at Object. (/opt/Riot/resources/app/src/electron-main.js:277:3) at Module._compile (internal/modules/cjs/loader.js:693:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10) at Module.load (internal/modules/cjs/loader.js:602:32) at tryModuleLoad (internal/modules/cjs/loader.js:541:12) at Function.Module._load (internal/modules/cjs/loader.js:533:3) at Object. (/opt/Riot/resources/electron.asar/browser/init.js:188:8) at Object. (/opt/Riot/resources/electron.asar/browser/init.js:190:3) at Module._compile (internal/modules/cjs/loader.js:693:30)
Up. Does someone know how to fix this ? Even after some updates it doesn't work :(
I found a solution.
For some reason, removing the package via apt
didn't work. A part of the directory wasn't removed, even with purge
command.
So I uninstalled the package, then removed /opt/Riot/
, and installed it again.
It works :)
Still reproducing for me.
I have run these commands:
git clone https://github.com/vector-im/riot-web.git
cd riot-web
yarn install
yarn build
yarn electron
And the output of the last one was:
yarn run v1.17.3
$ yarn install:electron && electron .
$ electron-builder install-app-deps
• electron-builder version=20.44.4
• loaded configuration file=package.json ("build" field)
• installing production dependencies platform=linux arch=x64 appDir=/home/victor/dist/riot-web/electron_app
App threw an error during load
TypeError: protocol.registerSchemesAsPrivileged is not a function
at Object.<anonymous> (/home/victor/dist/riot-web/electron_app/src/electron-main.js:238:10)
at Object.<anonymous> (/home/victor/dist/riot-web/electron_app/src/electron-main.js:451:3)
at Module._compile (internal/modules/cjs/loader.js:711:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at loadApplicationPackage (/usr/lib64/electron-3.1/resources/default_app.asar/main.js:286:12)
at Object.<anonymous> (/usr/lib64/electron-3.1/resources/default_app.asar/main.js:327:5)
at Object.<anonymous> (/usr/lib64/electron-3.1/resources/default_app.asar/main.js:364:3)
Unhandled exception TypeError: protocol.registerSchemesAsPrivileged is not a function
at Object.<anonymous> (/home/victor/dist/riot-web/electron_app/src/electron-main.js:238:10)
at Object.<anonymous> (/home/victor/dist/riot-web/electron_app/src/electron-main.js:451:3)
at Module._compile (internal/modules/cjs/loader.js:711:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at loadApplicationPackage (/usr/lib64/electron-3.1/resources/default_app.asar/main.js:286:12)
at Object.<anonymous> (/usr/lib64/electron-3.1/resources/default_app.asar/main.js:327:5)
at Object.<anonymous> (/usr/lib64/electron-3.1/resources/default_app.asar/main.js:364:3)
^C
electron --version
v3.1.8
Also tried electron 2.0.17 and got the same results.
Use electron 5 as documented in package.json
@t3chguy thanks
I was (finally!) able to start riot by removing the system version of electron and installing the proper version via npm.
git clone https://github.com/vector-im/riot-web.git
cd riot-web
git checkout v1.3.2
cp config.sample.json config.json
yarn install
yarn build
npm install electron@5.0.7
yarn electron
Description
npm run electron
throws errorSteps to reproduce
git clone https://github.com/vector-im/riot-web.git
cd riot-web
npm install
npm run build
npm install electron
npm run electron
Expectation: Normal startup of the riot desktop client
Version information