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

BetterDiscord installation fails #5

Closed
fhuewhd opened this issue Feb 27, 2018 · 6 comments
Closed

BetterDiscord installation fails #5

fhuewhd opened this issue Feb 27, 2018 · 6 comments
Labels
bug:resolved Something wasn't working but has been fixed

Comments

@fhuewhd
Copy link

fhuewhd commented Feb 27, 2018

I can install BetterDiscordCTL, and it seems to have installed, at least there it is in usr/local/bin, but when I put in "betterdiscordctl install -s /usr/share", I get this:

Updating asar...

/home/ab/.local/share/betterdiscordctl/asar/node_modules/asar/lib/asar.js:2
const fs = process.versions.electron ? require('original-fs') : require('fs')
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/ab/.local/share/betterdiscordctl/asar/node_modules/asar/bin/asar.js:2:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
sed: can't read /home/ab/.config/discord/0.0.4/modules/discord_desktop_core/core/app/mainScreen.js: No such file or directory
Cloning https://github.com/rauenzi/BetterDiscordApp...
ln: failed to create symbolic link ‘/home/ab/.config/discord/0.0.4/modules/discord_desktop_core/core/node_modules/betterdiscord’: No such file or directory
Installed. (Restart Discord if necessary.)

When I try to load Discord, it doesn't load, unless it's just updating really slowly - it's been hanging at the updater stage (the one that says "Readying the felines..." :-D ) for half an hour now. Any advice, please?

@ObserverOfTime
Copy link
Collaborator

ObserverOfTime commented Feb 27, 2018

This seems to be an issue with Node. Try this.

@bb010g
Copy link
Owner

bb010g commented Feb 28, 2018

What distribution are you using, and how did you install Node?

As for cleaning out the shell of BD and getting Discord running again, try rm -r ~/.config/discord/*/modules.

@bb010g
Copy link
Owner

bb010g commented Feb 28, 2018

Also, we may want to look into more checks for failure, as painful as bash may make them. :/

@ObserverOfTime
Copy link
Collaborator

ObserverOfTime commented Feb 28, 2018

We could add individual checks after the node-related commands that seem to fail a lot, or do something with ERR or DEBUG.

On second thought, maybe we should just check if core.asar has been extracted before proceeding.

@fhuewhd
Copy link
Author

fhuewhd commented Mar 2, 2018

Issue fixed by uninstalling everything very thoroughly and then reinstalling again using BetterDiscordCTL method, following exact instructions word for word. I'd been trying the main method and then the BetterDiscordCTL method haphazardly, switching to one when the other failed, and I think that must have muddled things up. Lesson, don't mix the two, if one fails then uzninstall BetterDiscrod, Node and NPM completely before trying again with the other.
You were quite right, it was NodeJS and I believe I can see why now. To install NodeJS, I typed "sudo apt install nodejs-legacy", as per the instructions in the Tutorial page on the BetterDiscord wiki. I thought at the time it was odd that it specified a "legacy" version, but that seemed to be what it wanted. Of course, that was the OTHER installation route - by the time I got to trying BetterDisordCTL again, I was fairly confused and didn't remember about the "legacy" thing, I just remembered that I'd already installed something called NodeJS and assumed that that was what it wanted. I did as the StackExchange instructions said and then removed BetterDiscordCTL with Synaptic Package Manger and tried again from scratch, and this time it installed successfully.
Somewhere along the way I also seem to have UN-broken Discord. Thanks very much for all the help. (Do yyou want me to close the issue or are you two still talking?)

@bb010g
Copy link
Owner

bb010g commented Mar 3, 2018

We can make a new issue for better error checks. Glad to see it's working for you now!

@bb010g bb010g closed this as completed Mar 3, 2018
ObserverOfTime added a commit that referenced this issue Mar 4, 2018
- Replace `readarray` with `read` for backwards compatibility (#3, #4)

- Show a proper error when core extraction fails (#5)

- Fix whitespace issues

- Fix Snap path

- Fix killing Discord processes
bb010g pushed a commit that referenced this issue Mar 15, 2018
* Bunch of bugfixes

- Replace `readarray` with `read` for backwards compatibility (#3, #4)

- Show a proper error when core extraction fails (#5)

- Fix Snap path

- Fix killing Discord processes

* Set flavor when scanning is skipped

Otherwise, uninstall will fail for PTB/Canary

* Improve Snap dir detection
@ObserverOfTime ObserverOfTime added the bug:resolved Something wasn't working but has been fixed label Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:resolved Something wasn't working but has been fixed
Projects
None yet
Development

No branches or pull requests

3 participants