Buttercup-desktop: Cannot find module '7zip-bin-linux' on Archlinux

Created on 20 Dec 2017  路  19Comments  路  Source: buttercup/buttercup-desktop

Hi !

I'm an Archlinux user, and I having problems installing buttercup on my main computer (install have been successfull on another one)

> [email protected] package:linux /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2
> build --linux --x64

electron-builder 19.45.5
Installing app dependencies for linux:x64 to /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/app
Packaging for linux x64 using electron 1.7.9 to release/linux-unpacked
Error: Cannot find module '7zip-bin-linux'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/7zip-bin/index.js:13:67)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at _load_zipBin (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/packager/dirPackager.js:67:22)
    at /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/packager/dirPackager.ts:62:13
From previous event:
    at unpack (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/packager/dirPackager.js:55:21)
    at unpackElectron (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/packager/dirPackager.ts:28:10)
    at /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/platformPackager.ts:160:27
    at Generator.next (<anonymous>)
    at runCallback (timers.js:773:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate [as _immediateCallback] (timers.js:711:5)
From previous event:
    at LinuxPackager.doPack (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/platformPackager.js:267:11)
    at /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/platformPackager.ts:115:16
    at Generator.next (<anonymous>)
From previous event:
    at LinuxPackager.pack (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/platformPackager.js:190:11)
    at /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/packager.ts:314:24
From previous event:
    at Packager.doBuild (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/packager.js:378:11)
    at /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/packager.ts:240:52
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/packager.js:307:11)
    at /home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/builder.ts:278:40
    at Generator.next (<anonymous>)
From previous event:
    at build (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/out/builder.js:68:21)
    at then (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:773:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate [as _immediateCallback] (timers.js:711:5)
From previous event:
    at Object.args [as handler] (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at Object.runCommand (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/node_modules/yargs/lib/command.js:228:22)
    at Object.parseArgs [as _parseArgs] (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/node_modules/yargs/yargs.js:1041:24)
    at Object.get [as argv] (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (/home/myfakehomename/.cache/pacaur/buttercup-desktop/src/buttercup-desktop-0.25.2/node_modules/electron-builder/src/cli/cli.ts:43:15)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:618:3
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! [email protected] package:linux: `build --linux --x64`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the [email protected] package:linux script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/myfakehomename/.npm/_logs/2017-12-20T13_46_27_483Z-debug.log

Medium Linux Medium Bug

Most helpful comment

If you look in the package-lock.json there's no 7zip-bin-linux, only 7zip-bin and 7zip-bin-mac, so that might be the issue.

Also, why is the package.json version still on 0.25.1 when 0.25.2 is tagged?

All 19 comments

I maintain the AUR for Arch users, and I'd recommend using that.

EDIT: Actually, I'm seeing the same issue.

As you can guest, I'm using AUR as well

@sum01 @ziltoidtheomiscient I have not tested actually building "on" a linux machine. The builds are done on a macOS machine for all platforms. I will look into this.

@sallar Thank you

If you look in the package-lock.json there's no 7zip-bin-linux, only 7zip-bin and 7zip-bin-mac, so that might be the issue.

Also, why is the package.json version still on 0.25.1 when 0.25.2 is tagged?

I have missed whether there is a resolution for this, as I am still getting this error today?

Thanks

The only fix would be to go back to v0.25.1, as I believe that wasn't broken. v0.25.2 doesn't have a fix yet. I'll change the PKGBUILD to 0.25.1 for now, give me a minute to do it. @mannp

Hm, trying to build 0.25.1 failed with the same issue. It seems I'd have to go back to 0.25.0 as that actually has 7zip-bin-linux in the package-lock.json

https://github.com/buttercup/buttercup-desktop/commit/61933599f8e1e2307bb351193b9cb2021f6f01ba#diff-32607347f8126e6534ebc7ebaec4853dL19 removes 7zip-bin-linux. @sallar

@mannp @ziltoidtheomiscient The AUR pkgbuild should work now. I put out a (lazy) patch to temporarily fix this.

@sum01 Thanks I'll try right now

@sum01 It worked ! Thx a lot :blush:

@sum01 Thanks for doing the changes, will give them a try tomorrow now.

Edit: Changes work great for me, thanks @sum01

@sum01 sorry I have been taking a few days off. What do I need to do to fix it?

@sallar I don't know the correct way to fix it (I don't really deal with npm much), so I just shoehorned in the dependency into package.json here https://aur.archlinux.org/cgit/aur.git/tree/fix_arch.patch?h=buttercup-desktop

I guess you could just use the patch if you wanted, or do it a different (more correct?) way, up to you.

6193359#diff-32607347f8126e6534ebc7ebaec4853dL19 removes 7zip-bin-linux

Well, it's removed from the package-lock, which is updated upon each execution of npm install. There was no actual removal within package.json it seems (at least not on that commit in which it changed). Perhaps it was removed as a dependency by some other library we use? I couldn't see any using it there though.

@perry-mitchell this 7zip dep is always causing trouble lol. I think its electron-builder that installs it. I think it's removed when we were trying to update some deps or something

The patch I was using isn't needed to build on v.0.26.0, so I guess something fixed the issue.

@sum01 That's good to hear :) Let's close this and re-open if there is an issue again. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikebowering picture mikebowering  路  5Comments

perry-mitchell picture perry-mitchell  路  6Comments

mokhosh picture mokhosh  路  6Comments

perry-mitchell picture perry-mitchell  路  4Comments

FuridamuFaita picture FuridamuFaita  路  3Comments