Cerebro: Non-working install when installing from AUR packages

Created on 21 Feb 2017  ยท  10Comments  ยท  Source: cerebroapp/cerebro

On Arch Linux, when installing the cerebro and cerebro-git AUR packages result in non-working install. I get the cerebro window, but I can not type in it:
cerebro-arch

If I run cerebro in a terminal, I get no error whatsoever.

AppImage is working fine though.

Most helpful comment

Just tested, works beautifully! Thanks a lot!

For people interested in AUR packages, I can update the build commands for cerebro-git right after #148 is merged into master, but to get the regular cerebro we'd need to wait for the next release.

All 10 comments

I confirm, looks like something got changed in the tools that we use to build cerebro. Both packages worked fine when 0.2.6 was released, but now there is a build failure if you clone a repo from scratch. And that is what both AUR packages do, they download sources and build them from scratch.

@KELiON you might want to look into this as well. I have a cloned cerebro repo since a few months, I do a git pull and then try to build - everything is fine. But when I clone the repo from scratch and try to build it, then I get a build failure.

Repro steps:

git clone https://github.com/KELiON/cerebro.git cerebro2
cd cerebro2
npm install
cd app/ 
npm install
cd ../

npm run build

The last command worked earlier and still works on my old-cloned cerebro repository, but it fails on the cerebro2 that I've just cloned above with the following errors:

ERROR in ./app/main/plugins/core/maps/index.js
Module parse failed: /home/maximbaz/private/cerebro2/node_modules/babel-loader/index.js!/home/maximbaz/private/cerebro2/app/main/plugins/core/maps/index.
js Unexpected token (34:63)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (34:63)
    at Parser.pp$4.raise (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:2221:15)
    at Parser.pp.unexpected (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:603:10)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1822:12)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1608:25)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseFunctionBody (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:2098:24)
    at Parser.pp$3.parseArrowExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:2087:10)
    at Parser.pp$3.parseParenArrowList (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1902:17)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1870:21)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
 @ ./app/main/plugins/core/index.js 12:8-25


ERROR in ./app/main/plugins/core/files/getPreview/preview/Archive.js
Module parse failed: /home/maximbaz/private/cerebro2/node_modules/babel-loader/index.js!/home/maximbaz/private/cerebro2/app/main/plugins/core/files/getPr
eview/preview/Archive.js Unexpected token (41:48)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (41:48)
    at Parser.pp$4.raise (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:2221:15)
    at Parser.pp.unexpected (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:603:10)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1822:12)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1608:25)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1608:25)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/maximbaz/private/cerebro2/node_modules/acorn/dist/acorn.js:1597:21)
 @ ./app/main/plugins/core/files/getPreview/index.js 59:15-43

Experiment has shown that the issue is caused by the latest release 6.23.0 of babel. Even though dependency versions are locked, the _nested dependency versions_ are not.

On the working repo:

โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ””โ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”‚   โ””โ”€โ”€ [email protected]
โ”‚ โ”‚ โ””โ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]

On the newly cloned repo:

โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ””โ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ [email protected]
โ”‚ โ”‚ โ”‚   โ””โ”€โ”€ [email protected]
โ”‚ โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”‚ โ””โ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”€ [email protected]
โ”‚ โ”œโ”€โ”ฌ [email protected]

@KELiON could you perhaps use npm shrinkwrap to lock the versions of the all the nested dependencies? That way we will not hit any surprises like that in the future. Ideally do it on the repo which doesn't have babel 6.23.0 yet :)

@maximbaz I'll check why it fails on babel 6.23.0 and try to fix it. And I'd just migrate to yarn, that should solve all npm problems.

I thought that fixing versions in package.json is strict enough to avoid this kind of problems, but it is not! Thanks for investigation, @maximbaz

@maximbaz I hope #148 should fix all npm-related shit. Can you try to install Cerebro from scratch from this branch on your machine and let me know if it is ok?

Just tested, works beautifully! Thanks a lot!

For people interested in AUR packages, I can update the build commands for cerebro-git right after #148 is merged into master, but to get the regular cerebro we'd need to wait for the next release.

The Yarn update works flawlessly. I maintain the package for Gentoo in my overlay, used yarn instead of npm, and it works fine.

@maximbaz #148 is merged, you can update cerebro-git

Thanks! cerebro-git is working again.

The cerebro on AUR is updated to 0.2.7, you can get back to stable package if you want :tada:

/cc @Smile4ever, @Godod, @pschmitt, @Cross03, @quatroka, @hughwilliams94, @commanderkelso, @sava-vidakovic, @harryio, @tunnckoCore, @mijoharas, @m1aw.

@maximbaz great! :tada:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vandamm picture vandamm  ยท  5Comments

FIJN picture FIJN  ยท  6Comments

andylima picture andylima  ยท  6Comments

kylewebdev picture kylewebdev  ยท  4Comments

mijoharas picture mijoharas  ยท  3Comments