Access denied when installing on WSL Ubuntu
Closed this issue · 3 comments
michael-zock commented
Any idea how this can be fixed?
michael@MICHAEL-DESKTOP:/mnt/c/Windows/System32$ npx pluto-iptv
Need to install the following packages:
pluto-iptv@1.3.1
Ok to proceed? (y)
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[INFO] Grabbing EPG...
http://api.pluto.tv/v2/channels?start=2024-05-12%2014%3A00%3A00.000%2B0200&stop=2024-05-14%2014%3A00%3A00.000%2B0200
[DEBUG] Using api.pluto.tv, writing cache.json.
node:internal/fs/utils:351
throw err;
^
Error: EACCES: permission denied, open 'cache.json'
at Object.openSync (node:fs:596:3)
at Object.writeFileSync (node:fs:2322:35)
at Request._callback (/home/michael/.npm/_npx/2e4f13705cf931f6/node_modules/pluto-iptv/index.js:50:10)
at self.callback (/home/michael/.npm/_npx/2e4f13705cf931f6/node_modules/request/request.js:185:22)
at Request.emit (node:events:517:28)
at Request.<anonymous> (/home/michael/.npm/_npx/2e4f13705cf931f6/node_modules/request/request.js:1154:10)
at Request.emit (node:events:517:28)
at IncomingMessage.<anonymous> (/home/michael/.npm/_npx/2e4f13705cf931f6/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:631:28)
at IncomingMessage.emit (node:events:529:35) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: 'cache.json'
}
Node.js v18.19.1
evoactivity commented
Why are you running it inside of /mnt/c/Windows/System32
you're not going to have write priveleges in that folder.
michael-zock commented
because that's where the prompt ended up, this piece of software is the only reason I even touched WSL for.
evoactivity commented
This will write files to the folder it is run in, so you will need to run it in a folder you hace write access to.
Also no need to run WSL just for node on windows.