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

Build fails on Arch Linux #143

Closed
radimsuckr opened this issue May 12, 2016 · 22 comments
Closed

Build fails on Arch Linux #143

radimsuckr opened this issue May 12, 2016 · 22 comments

Comments

@radimsuckr
Copy link

Hi,

I tried to build sqlelectron 1.8 from source on Arch Linux and the build command fails. I ran these commands:

npm install
npm run build:linux

The installation worked fine, but the build command fails with following message:

Error: Application entry file ./out/browser/main.js could not be found in package. Seems like a wrong configuration.
    at LinuxPackager.<anonymous> (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/platformPackager.ts:245:13)
    at undefined.next (native)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
From previous event:
    at tsAwaiter (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/awaiter.ts:10:47)
    at Object.build (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/builder.ts:30:59)
    at Object.<anonymous> (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/build-cli.ts:47:2)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:160:18)
    at node.js:445:3

Also, here's Gist of the npm-debug.log file.

@maxcnunes
Copy link
Member

Hi @Grelek,

The build script requires the compile script have been ran before.
Could you try to execute npm run dist instead? I have never tried on Arch Linux. I hope that works.

@radimsuckr
Copy link
Author

When I ran compile and then build:linux, it somehow worked. However, the final application is not what I expected...
1463053551

And the dist command fails with following message:

Error: spawn icns2png ENOENT
    at exports._errnoException (util.js:949:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From previous event:
    at Object.exec (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/util.ts:75:9)
    at LinuxPackager.<anonymous> (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/linuxPackager.ts:108:31)
    at undefined.next (native)
From previous event:
    at tsAwaiter (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/awaiter.ts:10:47)
    at Object.build (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/builder.ts:30:59)
    at Object.<anonymous> (/home/grelek/downloads/sqlectron-gui-1.8.0/node_modules/electron-builder/src/build-cli.ts:47:2)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:160:18)
    at node.js:445:3

Here's corresponding Gist.

@maxcnunes
Copy link
Member

There are some required packages to build the app: https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux.

Weird npm run compile && npm run build:linux should have the same behavior of npm run dist.

@radimsuckr
Copy link
Author

I think I installed all required libs successfully. dist command now works but it still produces the same (wrong) binary.

@maxcnunes
Copy link
Member

I'm gonna install a Ubuntu VM to see how it goes.

@BornaP
Copy link
Member

BornaP commented May 13, 2016

@Grelek I see you're using latest Node version, have you tried with v4.4.4 LTS (latest recommended for most linux users)?

@radimsuckr
Copy link
Author

@BornaP No, I haven't. I just downloaded nodejs package from Arch repository. I'll try 4.4.4 then.

@maxcnunes
Copy link
Member

@Grelek

I have installed a VM with Ubuntu 16.04. The build works following these steps:

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install nodejs git-core icnsutils graphicsmagick xz-utils
npm install
npm run dist

The executable is in dist/Sqlectron-linux-x64/ and dist/Sqlectron-linux-ia32/.

I was using:

  • node 5.11.1
  • npm 3.8.6
  • git 2.7.4

I have also download the ISO for Arch Linux. I will try later on that as well. But maybe take a bit more time because I have not used Arch linux before.

@maxcnunes
Copy link
Member

Sorry @Grelek, I could not get a Arch Linux running. The only VM I found with Arch Linux didn't work. But since it works on Ubuntu I guess this is probably a problem with some missing package or even using a different version of some package.

@radimsuckr
Copy link
Author

Hi, I tried compiling it with node 4.4.4 and it ran successfully without any errors, but I still get not working build. I'll try to investigate it a bit more when I have time.
1463474896

@maxcnunes
Copy link
Member

@Grelek Could you try these steps below?

  1. Remove the node_modules from the root directory of the project
  2. Remove the node_modules from the app directory
  3. Install the deps with npm install (please provide the log)
  4. Build the app with npm run dist (please provide the log)
  5. Attach here the dist generated folder.

@maxcnunes
Copy link
Member

Could you try if this one built on Ubuntu works for you?
http://expirebox.com/download/459f6420e2979a0385aaaffe49ebd3be.html

@radimsuckr
Copy link
Author

Hi, I tried the Ubuntu build and it works like a charm.

Now I have only npm install log, npm run dist didn't generate any logs. And I forgot to copy the dist directory, so I don't have access to it right now, will post it later.

@maxcnunes
Copy link
Member

Seems is everything ok with the npm install. npm run dist should have generated an output similar to this one https://gist.github.com/maxcnunes/7e03203a76e89db258db2e93b02b8149#file-sqlectron-npm-run-dist-log (although this one is for mac).
Since is possible to use the build from Ubuntu. Is there a reason to you not use them? We could include them in the release files.

@denysvitali
Copy link

Same error here in Arch Linux,
I installed all the packages but this is what I get while dist-compiling:

ERROR in Path must be a string. Received undefined
>> success
Warning: license in the development package.json is deprecated, please move to the application package.json

TypeError: Path must be a string. Received undefined while running ./dist/Sqlectron-linux-x64/Sqlectron

screenshot from 2016-05-25 14-28-46

Okay, I was able to build it in Arch Linux x64 by downgrading node to 4.4.5
Apparently is a problem with gulp / vinyl-fs
I'm going to share with you guys the compiled version, tested in Arch x64

Here it is (click it in ~20 mins since it's still uploading and I've got a pretty bad upload connection here)

@BornaP
Copy link
Member

BornaP commented May 25, 2016

Thank you @denysvitali !

@radimsuckr
Copy link
Author

@denysvitali Ok, I'll try it. I wanted to make an AUR package for SQLELECTRON but those problems slowed me down and I didn't have time to solve them. 😄

maxcnunes added a commit that referenced this issue Jun 15, 2016
* deb
* rpm
* sh
* freebsd
* pacman
* tar.xz
* tar.gz

This should close the issues #143 and #197
@maxcnunes
Copy link
Member

@Grelek now sqlectron has installer support for more Linux distros. Does the pacman or any other works for you? https://github.com/sqlectron/sqlectron-gui/releases/tag/v1.10.0

@radimsuckr
Copy link
Author

Hi I tried pacman and sh version and none of them works for me. pacman package has some problems with dependencies.

grelek ~/downloads pacaur -U Sqlectron-1.10.0.pacman 
loading packages...
resolving dependencies...
warning: cannot resolve "libappindicator1", a dependency of "Sqlectron"
warning: cannot resolve "libnotify-bin", a dependency of "Sqlectron"
:: The following package cannot be upgraded due to unresolvable dependencies:
      Sqlectron

:: Do you want to skip the above package for this upgrade? [y/N] y
looking for conflicting packages...
 there is nothing to do

maxcnunes added a commit that referenced this issue Jun 22, 2016
Probably it fix the Linux installers #143.
@maxcnunes
Copy link
Member

@Grelek I guess I have fixed that. Could you check again please? https://github.com/sqlectron/sqlectron-gui/releases/tag/v1.11.2-beta.0

@radimsuckr
Copy link
Author

@maxcnunes This works like a charm, thank you. :-)

@maxcnunes
Copy link
Member

Awesome 🎉

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

4 participants