appbaseio / dejavu

The Missing Web UI for Elasticsearch: Import, browse and edit data with rich filters and query views, create search UIs visually.

Home Page:https://dejavu.reactivesearch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dejavu on ARM64 docker

rbonghi opened this issue · comments

I was trying to compile Dejavu on ARM64 architecture, but I got some issues.

First for all, I show all steps that I do:

git clone https://github.com/appbaseio/dejavu.git
cd dejavu

I tried to build the docker image using:

docker build -t appbaseio/dejavu .

I got this error:

error cross-env@7.0.2: The engine "node" is incompatible with this module. Expected version ">=10.14". Got "10.13.0"
error Found incompatible module
The command '/bin/sh -c yarn && yarn cache clean && yarn build:dejavu:app && rm -rf /dejavu/node_modules && rm -rf /tmp/*' returned a non-zero code: 1

I fixed it by changing the docker base to node:10.14.2-alpine, but I got another error that I don't know how to fix.

error /dejavu/node_modules/phantomjs-prebuilt: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /dejavu/node_modules/phantomjs-prebuilt
Output:
PhantomJS not found on PATH
Unexpected platform or architecture: linux/arm64
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally
The command '/bin/sh -c yarn && yarn cache clean && yarn build:dejavu:app && rm -rf /dejavu/node_modules && rm -rf /tmp/*' returned a non-zero code: 1

I was looking online and seems you need to build PhantomJS from scratch (Medium/phantomjs#577), but I'm not an expert. I have seen another PhantomJS and I don't know which version are you using.

Do you know how can I fix it?

Thank you in advance

@rbonghi Thanks for bringing attention to this. Can you confirm if #412 fixes the local (and docker) build for you? We can then merge and release this.

Unfortunately, I got other errors.
I share here the full log, and it is too long to paste here https://pastebin.com/CZEkRP2M.

The first error is coming from line 139 (from PasteBin)

dejavu-main: ERROR in ./app/src/components/SearchPreview.js
dejavu-main: Module not found: Error: Can't resolve '../batteries/components/BaseContainer' in '/dejavu/packages/dejavu-main/app/src/components'

Same here (line 157)

dejavu-main: ERROR in ../browser/lib/reducers/index.js
dejavu-main: Module not found: Error: Can't resolve '../batteries/modules/reducers' in '/dejavu/packages/browser/lib/reducers'

And from line 206, only errors.

@rbonghi That path is from a submodule and it looks like it wasn't fetched.

git submodule init && git submodule update --recursive --remote should resolve this.

Yes, it works great!

Thank you!

Building on Apple Silicone from source; errors with Babel.

@appbaseio/dejavu-browser: Add @babel/plugin-proposal-optional-chaining (https://git.io/vb4Sk) to the 'plugins' section of your Babel config to enable transformation.\n at Object.raise (/dejavu/node_modules/@babel/parser/lib/index.js:6975:17)\n at Object.expectPlugin (/dejavu/node_modules/@babel/parser/lib/index.js:8373:18)\n at Object.parseSubscript (/dejavu/node_modules/@babel/parser/lib/index.js:9246:12)\n at Object.parseSubscript (/dejavu/node_modules/@babel/parser/lib/index.js:2857:18)\n at Object.parseSubscripts (/dejavu/node_modules/@babel/parser/lib/index.js:9231:19)\n at Object.parseSubscripts (/dejavu/node_modules/@babel/parser/lib/index.js:2819:18)\n at Object.parseExprSubscripts (/dejavu/node_modules/@babel/parser/lib/index.js:9220:17)\n at Object.parseMaybeUnary (/dejavu/node_modules/@babel/parser/lib/index.js:9190:21)\n at Object.parseExprOps (/dejavu/node_modules/@babel/parser/lib/index.js:9056:23)\n at Object.parseMaybeConditional (/dejavu/node_modules/@babel/parser/lib/index.js:9029:23) {\n pos: 2029,\n loc: Position { line: 88, column: 44 },\n missingPlugin: [ 'optionalChaining' ],\n code: 'BABEL_PARSE_ERROR'

lerna ERR! SyntaxError: /dejavu/packages/browser/src/batteries/components/SearchSandbox/containers/MonacoEditor.js: Support for the experimental syntax 'optionalChaining' isn't currently enabled (88:45):

@deathdefyer We should create a new issue for this error. I can't replicate it. The following context would be helpful:

  1. Which OS / architecture are you building this on?
  2. What is the build command (there are several) that you're running?
  3. Try this branch and share if it works for you: https://github.com/appbaseio/dejavu/tree/fix/babel-optional-chaining