leoding86 / pixiv-omina

Pixiv Omina is a software for downloading artworks and comics from Pixiv and Pixiv Comic
Mozilla Public License 2.0
280 stars 25 forks source link

[Linux] Cannot compile current master #71

Open sakkamade opened 3 years ago

sakkamade commented 3 years ago

Omina version

Current master

OS version

Arch Linux, KDE

What is the problem

Unable to build requirements. Did not build it in some time, but as far as I remember I was able to compile it without any issue last time, although on another machine. Therefore, the most probable cause is incomparability of versions of some dependencies. Will be glad to receive any help and provide additional data :heart:

Steps to reproduce

  1. clone repository
  2. run yarn

Extra info

This is only a part of the console output, however it contains the error.

pixivomina-console-log.txt

P.s. Glad to see you back, leoding86.

sakkamade commented 3 years ago

Also tried to compile with this 4bb8d97aff9c4332990e4f51fab6aa93c11d53fc commit (which I was certainly able to compile earlier), getting error all the same.

Here is full console log: console log omina.txt

leoding86 commented 3 years ago

I don't use Linux as desktop, it seems like it can't build node-sass. I encountered the issue before, I just run npm rebuild node-sass for rebuilding node-sass then the problem was gone. But I'm using Windows 10. I'm not sure if it will works in your situation.

I didn't configure build settings for Linux and I didn't change any build settings in last few commits.

sakkamade commented 3 years ago

Thank you! I'll try to install it by npm tomorrow.

sakkamade commented 3 years ago

After an hour of trials and errors I have finally build it.

  1. run npm install node-sass in some folder; we shall name it "folder-1" in order to simplify elucidation
  2. clone repository; we shall name it "folder-2"
  3. run yarn in folder-2 and receive a building error at some point
    1. if we take a look at the path node_modules/node-sass/vendor/linux-x64-93/—we shall name it "path-1"—we will see that there is no binding.node file
  4. now we move to the folder-1, enter the path-1, and symlink, or copy, the binding.node file into the path-1 of folder-2
  5. then run npm rebuild node-sass in folder-2
  6. Profit!

Every step is important, as I have tried so many times with different commands and their combinations, and only this has worked for me.

So the question is "Why?"—Why does it not build by yarn? Any ideas on how to build it more neatly?

leoding86 commented 3 years ago

@sakkamade Because using yarn to build application from fresh, it will use electron build scripts to build node-sass binary. And if you using npm to build node-sass will use another different build scripts. I don't very understand the magic behind it, but it just work.

As my experience, you don't need folder-1. You can npm rebuild node-sass in folder-2 first, then everything should work.

sakkamade commented 3 years ago

you don't need folder-1. You can npm rebuild node-sass in folder-2 first

Nope, here what I get when I am doing it debug.log

sakkamade commented 3 years ago

Because using yarn to build application from fresh, it will use electron build scripts to build node-sass binary. And if you using npm to build node-sass will use another different build scripts.

Yes, I understand that; but where might be the cause of this in electron build scripts? What I can try to change there?