Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Cannot compile current master #71

Open
sakkamade opened this issue Jun 22, 2021 · 7 comments
Open

[Linux] Cannot compile current master #71

sakkamade opened this issue Jun 22, 2021 · 7 comments

Comments

@sakkamade
Copy link
Contributor

sakkamade commented Jun 22, 2021

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 ❤️

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
Copy link
Contributor Author

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

Here is full console log: console log omina.txt

@leoding86
Copy link
Owner

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
Copy link
Contributor Author

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

@sakkamade
Copy link
Contributor Author

sakkamade commented Jun 22, 2021

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
Copy link
Owner

@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
Copy link
Contributor Author

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
Copy link
Contributor Author

sakkamade commented Jun 23, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants