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

Error while installing npm dependecies #20

Closed jpitkanen18 closed 5 years ago

jpitkanen18 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!

Description

When running ´npm install´ on the latest version on macOS Mojave npm WARN deprecated snekfetch@3.6.4: use node-fetch instead npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/justJS/prism-media.git npm ERR! npm ERR! git@github.com: Permission denied (publickey). npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists. npm ERR! npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in: npm ERR! /Users/MYNAME/.npm/_logs/2019-02-18T20_27_46_970Z-debug.log

Specifications

Version is the version of EasyRPC, Platform is Windows/macOS/Linux, and Platform Version is the version of the platform (e.g. 10.13.1 for macOS, or 10 for Windows.).

thatmint123 commented 5 years ago

Also have this on macOS.

Clusters commented 5 years ago

The repository (github.com/justJS/prism-media.git) which should be one of justJS's own repository, can not be found on github. Why is it missing??

jpitkanen18 commented 5 years ago

Figured that as well, maybe it's been made private or deleted by justJS without them remembering it was a dependency.

Clusters commented 5 years ago

This must be quite recent. But I'm confident @justJS will look into it soon :)

If you want to be a bit experimental and be able to use SimplePresence in the meantime: I deleted the depenency entry from package.json and for my needs it runs without any issues so far. Prism-media seemed to be a fork and I looked at its origin. It might be needed for more advanced use cases with last.fm or youtube?

julianschiavo commented 5 years ago

Hey all, was cleaning up my repos recently and mistakenly deleted that one. Could you check if installing the normal (non-forked) prism-media works?

jpitkanen18 commented 5 years ago

Non-forked version works but I can't install it in the SimplePresence directory which was to be expected

Clusters commented 5 years ago

I just checked. It's installing without any error. But I did not test the full function-set so far. @jpitkanen18 I was able to do that 🤔

julianschiavo commented 5 years ago

Why's that? You can remove prism-media from the package.json @jpitkanen18

jpitkanen18 commented 5 years ago

Oh nevermind I'm stupid, I had two versions of SimplePresence installed

marfier commented 5 years ago

I'm having this same issue. I still haven't found a solution.

advaith1 commented 5 years ago

@GalacticLion7 did you try removing prism-media from package.json?

marfier commented 5 years ago

@GalacticLion7 did you try removing prism-media from package.json?

Now I'm getting this error after removing the prism-media line in package.json:

npm ERR! file C:\Users\snipped\SimplePresence\package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token } in JSON at position 1320 while parsing near '...etch": "^3.5.8",
npm ERR! JSON.parse   },
npm ERR! JSON.parse   "browser": {
npm ERR! JSON.parse ...'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\snipped\AppData\Roaming\npm-cache\_logs\2019-03-09T11_51_59_857Z-debug.log

I'm using Notepad++, and yes, it's JSON, not JavaScript.

Here's the log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose npm-session 61bfb58e9508fdba
5 silly install runPreinstallTopLevelLifecycles
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 timing stage:rollbackFailedOptional Completed in 2ms
9 timing stage:runTopLevelLifecycles Completed in 417ms
10 verbose stack Error: Failed to parse json
10 verbose stack Unexpected token } in JSON at position 1320 while parsing near '...etch": "^3.5.8",
10 verbose stack   },
10 verbose stack   "browser": {
10 verbose stack ...'
10 verbose stack     at parseError (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:452:11)
10 verbose stack     at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:104:26)
10 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:51:5
10 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16
10 verbose stack     at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
11 verbose cwd C:\Users\snipped\SimplePresence
12 verbose Windows_NT 10.0.17763
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
14 verbose node v10.15.3
15 verbose npm  v6.4.1
16 error file C:\Users\snipped\SimplePresence\package.json
17 error code EJSONPARSE
18 error JSON.parse Failed to parse json
18 error JSON.parse Unexpected token } in JSON at position 1320 while parsing near '...etch": "^3.5.8",
18 error JSON.parse   },
18 error JSON.parse   "browser": {
18 error JSON.parse ...'
19 error JSON.parse Failed to parse package.json data.
19 error JSON.parse package.json must be actual JSON, not just JavaScript.
20 verbose exit [ 1, true ]
advaith1 commented 5 years ago

The JSON syntax is incorrect

marfier commented 5 years ago

The JSON syntax is incorrect

I’m pretty sure it’s correct.. The file ends with a .json, and Notepad++ detected it as JSON and didn’t show any syntax errors.

advaith1 commented 5 years ago

Well, it says "failed to parse JSON" so it must be incorrect, if you can upload it (you can paste it) we can see what the issue is.

Pebuhcha commented 5 years ago

I have the same exact issue, and it says that the issue is in line two with "SimplePresence". I know next to nothing about this and I wasn't able to find a solution..

{ "name": "SimplePresence", "version": "2.7.0", "description": "An easy and simple way to set your Discord Rich Presence Status through RPC!", "main": "scripts/custom/main.js", "author": "dotJS", "license": "MIT", "homepage": "https://github.com/justdotJS/SimplePresence#readme", "bugs": { "url": "https://github.com/justdotJS/SimplePresence/issues" }, "repository": { "type": "git", "url": "git+https://github.com/justdotJS/SimplePresence.git" }, "scripts": { "custom": "electron scripts/custom/main.js", "apple": "electron scripts/apple/main.js", "spotify": "electron scripts/spotify/main.js", "google": "electron scripts/google/main.js", "lastfm": "electron scripts/lastfm/main.js", "imdb": "electron scripts/imdb/main.js", "youtube": "electron scripts/youtube/main.js", "foobar": "electron scripts/foobar/main.js" }, "dependencies": { "@dnode/parse-duration": "^1.4.2", "discord-rpc": "github:devsnek/discord-rpc", "electron": "^1.7.9", "imdb": "^1.1.0", "lastfm": "^0.9.2", "moment": "^2.19.2", "node-spotify-webhelper": "github:justJS/node-spotify-webhelper", "open": "0.0.5", "osascript-promise": "^1.0.0", "parse-duration": "^0.1.1", "snekfetch": "^3.5.8" }, "browser": { "net": false, "ws": false, "uws": false, "erlpack": false, "src/transports/IPC.js": false } }

Pebuhcha commented 5 years ago

I have figured out the issue.

After removing the prism-media from package.json, I realized that in VS Code, it doesn't allow you to have capital letters in the package name. In the pre-installed schema on VS Code https://json.schemastore.org/package, it is possible to override it, but I decided to just go to the regular terminal on Mac and it actually worked. The terminal on VS Code was the one giving the problem.