siphomateke / deezer

Unofficial script to install Deezer Desktop on Ubuntu. Based on AUR Script (https://aur.archlinux.org/packages/deezer/) by SibrenVasse
150 stars 11 forks source link

error running install script #1

Closed siphomateke closed 4 years ago

siphomateke commented 4 years ago

This issue was originally incorrectly reported by @pskraemer11 on the upstream Arch Linux package https://github.com/SibrenVasse/deezer/issues/8.

Running the install.sh I get an error message and it stops waiting on input:

npm WARN enoent ENOENT: no such file or directory, open '/home/peter/bin/deezer-mpris/npm_temp/package.json'
npm WARN npm_temp No description
npm WARN npm_temp No repository field.
npm WARN npm_temp No README data
npm WARN npm_temp No license field.
prettier requires at least version 10.13.0 of Node, please upgrade
prettier requires at least version 10.13.0 of Node, please upgrade
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/build/main.js b/build/main.js
|index a229f52..0f1955b 100644
|--- a/build/main.js
|+++ b/build/main.js
--------------------------
File to patch:
siphomateke commented 4 years ago

@pskraemer11 Which exact commands did you run and what operating system version are you using?

pskraemer11 commented 4 years ago

I have Gallium OS 3.0 on a chromebook, based on Ubuntu bionic with linux kernel 4.16.18.

I have seen, that I used on old version of node.js. Now I installed an new version v12.18.0 of node.js. npm ist version 6.14.4.

pskraemer11 commented 4 years ago

I run the command "sudo ../install.sh".

Running the install script one again, first warning is: "npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142"

Then at second comes more errors and warnings: "> abstract-socket@2.1.1 install /home/peter/bin/deezer-mpris/npm_temp/node_modules/abstract-socket

node-gyp rebuild

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/peter/bin/deezer-mpris/npm_temp/node_modules/abstract-socket/build' gyp ERR! System Linux 4.16.18-galliumos gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/peter/bin/deezer-mpris/npm_temp/node_modules/abstract-socket gyp ERR! node -v v12.18.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN saveError ENOENT: no such file or directory, open '/home/peter/bin/deezer-mpris/npm_temp/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/home/peter/bin/deezer-mpris/npm_temp/package.json' npm WARN npm_temp No description npm WARN npm_temp No repository field. npm WARN npm_temp No README data npm WARN npm_temp No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abstract-socket@2.1.1 (node_modules/abstract-socket): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abstract-socket@2.1.1 install: node-gyp rebuild npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1"

pskraemer11 commented 4 years ago

p.s. just with the first error message: "permission denied, mkdir '/home/peter/bin/deezer-mpris/npm_temp/node_modules/abstract-socket/build'" - this directory does not exist. Neither '/home/peter/bin/deezer-mpris/npm_temp/node_modules/abstract-socket/

pskraemer11 commented 4 years ago

when I although try to run deezer there is an error while authorization on the deezer website https://www.deezer.com/desktop/login/electron/callback: (translated) "The site deezer://autolog/xyz....(very long ascii-string) could no be opend." and: "The specified location is not supported."

FoggyMtnDrifter commented 4 years ago

Any updates on this or should I look for another solution?

siphomateke commented 4 years ago

Apologies for the delay. I got quite busy recently.

@pskraemer11 I've fixed the permission denied errors, but it seems like they weren't preventing you from installing Deezer. Please try the latest git version to see if everything works now. Make sure to not run the script as sudo as you will now be prompted for your password only when necessary.

The error you were experiencing with the "deezer://" URL handler is probably to do with your OS. Assuming it still doesn't work, can you please confirm whether /usr/share/applications/deezer.desktop exists and if it contains MimeType=x-scheme-handler/deezer?

@hostbend Which issue were you encountering exactly and what OS are you using?

ToMattBan commented 4 years ago

Apologies for the delay. I got quite busy recently.

@pskraemer11 I've fixed the permission denied errors, but it seems like they weren't preventing you from installing Deezer. Please try the latest git version to see if everything works now. Make sure to not run the script as sudo as you will now be prompted for your password only when necessary.

The error you were experiencing with the "deezer://" URL handler is probably to do with your OS. Assuming it still doesn't work, can you please confirm whether /usr/share/applications/deezer.desktop exists and if it contains MimeType=x-scheme-handler/deezer?

@hostbend Which issue were you encountering exactly and what OS are you using?

I've tried right now. Have the problems with installing the packages in the lines 11, 12 and 13 (

sudo: npm: command not found
sudo: npm: command not found
sudo: npm: command not found

. I've instaled manually, removed the lines and run again the script. If I don't run with sudo, I get this error:

./install.sh: 47: ./install.sh: prettier: not found
./install.sh: 48: ./install.sh: prettier: not found
patching file build/main.js
Hunk #1 FAILED at 4580.
1 out of 1 hunk FAILED -- saving rejects to file build/main.js.rej
patching file build/main.js
Hunk #1 FAILED at 3123.
Hunk #2 FAILED at 4714.
2 out of 2 hunks FAILED -- saving rejects to file build/main.js.rej
patching file build/main.js
Hunk #1 FAILED at 2108.
Hunk #2 FAILED at 4428.
2 out of 2 hunks FAILED -- saving rejects to file build/main.js.rej
patching file node_modules/electron-media-service/src/index.js
patching file node_modules/electron-media-service/src/linux/index.js
(node:3689) ExperimentalWarning: The fs.promises API is experimental
mkdir: cannot create directory ‘/usr/share/deezer’: Permission denied
install: target '/usr/share/deezer/' is not a directory: No such file or directory

And if I run with sudo, I got this one instead

./install.sh: 26: ./install.sh: asar: not found
rm: cannot remove 'app/node_modules/@nodert': No such file or directory
./install.sh: 36: ./install.sh: npm: not found
mv: cannot stat 'node_modules/*': No such file or directory
./install.sh: 47: ./install.sh: prettier: not found
./install.sh: 48: ./install.sh: prettier: not found
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/build/main.js b/build/main.js
|index a229f52..0f1955b 100644
|--- a/build/main.js
|+++ b/build/main.js
--------------------------
File to patch: 
siphomateke commented 4 years ago

@ToMattBan What OS are you using? Seems like nodejs isn't installing properly when line 10 (sudo apt install p7zip imagemagick nodejs wget) is run.

ToMattBan commented 4 years ago

@ToMattBan What OS are you using? Seems like nodejs isn't installing properly when line 10 (sudo apt install p7zip imagemagick nodejs wget) is run.

I'm using elementary. I know node is installed because I use it to work. But I can try reinstall

ToMattBan commented 4 years ago

@ToMattBan What OS are you using? Seems like nodejs isn't installing properly when line 10 (sudo apt install p7zip imagemagick nodejs wget) is run.

I Reinstall node here and the 7z. Now The error is:

mkdir: cannot create directory ‘/usr/share/deezer’: Permission denied
install: target '/usr/share/deezer/' is not a directory: No such file or directory

With sudo, return asking the patch

siphomateke commented 4 years ago

@ToMattBan I created this install script for Ubuntu and so was unaware of how nodejs and npm were packaged on elementaryOS. After some testing in a virtual machine, it seems like elementaryOS doesn't automatically install npm with nodejs and also has an outdated node version. I've now updated the install script to manually install the right one. I've also fixed the permission errors. That was on me for not testing in a clean environment.

Deezer now installs and runs successfully in my elementaryOS virtual machine. Please test the latest version on your system and confirm that it works.

FoggyMtnDrifter commented 4 years ago

Can confirm it's working now on Pop!OS. Thanks!

ToMattBan commented 4 years ago

@ToMattBan I created this install script for Ubuntu and so was unaware of how nodejs and npm were packaged on elementaryOS. After some testing in a virtual machine, it seems like elementaryOS doesn't automatically install npm with nodejs and also has an outdated node version. I've now updated the install script to manually install the right one. I've also fixed the permission errors. That was on me for not testing in a clean environment.

Deezer now installs and runs successfully in my elementaryOS virtual machine. Please test the latest version on your system and confirm that it works.

I can confirm. This realy worked here o/. Thanks dude!

ToMattBan commented 4 years ago

I noticed the app don't have the icon, but I don't know why. I'm searching here but found the icons in the folder /usr/share/icons/hicolor/ but the app can't get it or something like that. I restarted the pc already

siphomateke commented 4 years ago

@ToMattBan I did notice that but assumed it was because I hadn't restarted the virtual machine. I'm afraid I don't have enough experience with elementaryOS to know why the icon doesn't work. If you know how to correctly configure a .desktop file's icon for elementaryOS, I'll happilly fix it. In the meantime, you might be able to fix it by replacing Icon=deezer with a particular icon file like Icon=/usr/share/icons/hicolor/256x256/apps/deezer.png in your /usr/share/applications/deezer.desktop file.

ToMattBan commented 4 years ago

@siphomateke Yep. Just do it after some searches and really worked. Now the .desktop is like this: Icon=/usr/share/icons/hicolor/256x256/apps/deezer.png Are working in carious resolutions too. I don't understand why just put deezer don't work, I see some others apps and is the same way.

ToMattBan commented 4 years ago

@siphomateke Just to inform. Installing the dependencies manually(nodejs and p7zip-full) , I can install Deezer in a OpenSuse system just by run your script. Thanks again!

siphomateke commented 4 years ago

@ToMattBan Glad to hear that it works on other distros. I don't plan to add proper support for others at the moment though as I don't really have the skills, knowledge or time to handle all the edge cases. This project is just a basic fork of the AUR package https://aur.archlinux.org/packages/deezer/. Perhaps in the future someone will create a Flatpak installer or something to handle more distros.