julianschiavo / SimplePresence

An easy and simple way to set your Discord Rich Presence Status through RPC (no token required)
GNU General Public License v2.0
194 stars 37 forks source link

A JavaScript error occurred in the main process #25

Closed franz3x8 closed 5 years ago

franz3x8 commented 5 years ago

Checklist

Type

Please select what type of issue this is. Please do not use Issues for Support, ask on the Discord!

[ ✔️] Bug Report

Description

hi i followed the guide on how to install SimplePresence (i already have simple presence back then but i had to format my mac) but when i tried to run the config.json file i kept on getting a Java script error which is pasted below.

App threw an error during load /Users/username/Documents/GitHub/SimplePresence/node_modules/discord-rpc/src/client.js:634 ...r, ^^^

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 Object. (/Users/username/Documents/GitHub/SimplePresence/node_modules/discord-rpc/src/index.js:6:11)

Specifications

Version: latest one Platform: Mac Platform Version: Mojave 10.14.6

advaith1 commented 5 years ago

go to that file and delete that line (with ...r)

FrankHeijden commented 4 years ago

Hi, I am having the same issue here, for some reason node doesn't recognize the ... operator; and deleting that line doesn't work (/ isn't a right fix for this, doesn't work because the same ... operator is used in other files as well). I tried searching google what could cause this, it said that node only supports it since node 8.6.0; but I have the following versions installed:

Screenshot 2020-03-16 at 20 01 28

And have the latest version of this repo: 5d94ddcce71cd87df16efbefed5ba59b2e8a6f0a

What could be causing this? Is this a MacOS specific thing that it doesn't recognize that operator?

FrankHeijden commented 4 years ago

Problem is caused by an outdated version of Electron, which doesn't have the support for the Spread Operator. Changing the version in package.json to 8.1.1 or electron does the trick.