opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.64k stars 855 forks source link

Unable to install OpenSearch Dashboards on ppc64le #1018

Open helix-loop opened 2 years ago

helix-loop commented 2 years ago

OS / architecture Debian Bullseye / ppc64le

OpenSearch-Dashboards version 1.2.0

Failed command yarn osd bootstrap

Output

yarn run v1.22.17
$ node scripts/osd bootstrap
 info [opensearch-dashboards] running yarn

$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@~3.7.2"
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @elastic/eui@29.3.2" has incorrect peer dependency "typescript@^3.7.2".
warning " > @testing-library/react-hooks@3.4.1" has unmet peer dependency "react-test-renderer@>=16.9.0".
warning "workspace-aggregator-c07d6954-8bfe-452a-adf7-9d6ab181fbc9 > @osd/storybook > @storybook/addon-essentials@6.0.16" has unmet peer dependency "react-is@^16.8.0".
warning "workspace-aggregator-c07d6954-8bfe-452a-adf7-9d6ab181fbc9 > @osd/storybook > @storybook/addon-essentials > @storybook/addon-docs@6.0.16" has unmet peer dependency "react-is@^16.8.0".
warning "workspace-aggregator-c07d6954-8bfe-452a-adf7-9d6ab181fbc9 > @osd/storybook > @storybook/addon-essentials > @storybook/addon-docs > @mdx-js/react@1.6.16" has incorrect peer dependency "react@^16.13.1".
[5/5] Building fresh packages...
[9/46] ⠁ puppeteer
[14/46] ⠁ chromedriver
[8/46] ⠁ re2
[10/46] ⠁ lmdb-store
error /path/xyz/OpenSearch-Dashboards-1.2.0/node_modules/chromedriver: Command failed.
Exit code: 1
Command: node install.js
Arguments: 

ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: /path/xyz/.nvm/versions/node/v10.24.1/lib/node_modules/yarn/bin/yarn.js install --non-interactive
          at makeError (/path/xyz/OpenSearch-Dashboards-1.2.0/packages/osd-pm/dist/index.js:25139:11)
          at handlePromise (/path/xyz/OpenSearch-Dashboards-1.2.0/packages/osd-pm/dist/index.js:24074:26)
          at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I searched for similar errors but they were outdated or the answers did not help me. I also found #996 which seemed similar to me, but caused by puppeteer, not chromedriver.

kavilla commented 2 years ago

Hello @helix-loop, thanks for opening.

I see you mention: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/996. Based on error message, it looks the same to me.

[9/46] ⠁ puppeteer
[14/46] ⠁ chromedriver
...
error /path/xyz/OpenSearch-Dashboards-1.2.0/node_modules/chromedriver: Command failed.

Puppeteer utilizes chromedriver and chromedriver might not be installed locally. Do you have installed and it's still not working?

helix-loop commented 2 years ago

Unfortunately I am not able to install chromedriver / chromium-driver on Debian Bullseye / ppc64le from packages (https://packages.debian.org/bullseye/chromium-driver). Is there another way to work around this?

tmarkley commented 2 years ago

1113 removes the dependency on puppeteer so after we merge that this shouldn't be an issue moving forward.

helix-loop commented 2 years ago

Trying again with the master branch I get the following similar errors:

yarn run v1.22.17
$ node scripts/osd bootstrap
 info [opensearch-dashboards] running yarn

$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@~4.5.2"
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @elastic/eui@29.3.2" has incorrect peer dependency "typescript@^3.7.2".
[5/5] Building fresh packages...
[13/17] ⡀ fetch-mock
[10/17] ⡀ chromedriver
[12/17] ⡀ lmdb-store
[4/17] ⡀ node-sass
error /path/xyz/opensearchdashboards/OpenSearch-Dashboards/node_modules/chromedriver: Command failed.
Exit code: 1
Command: node install.js
Arguments: 

ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: /path/xyz/.nvm/versions/node/v14.18.2/lib/node_modules/yarn/bin/yarn.js install --non-interactive
          at makeError (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:25139:11)
          at handlePromise (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:24074:26)
          at processTicksAndRejections (internal/process/task_queues.js:95:5)
          at async installInDir (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:23810:3)
          at async Project.installDependencies (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:14769:5)
          at async Object.run (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:8992:11)
          at async runCommand (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:57859:5)
          at async Module.run (/path/xyz/opensearchdashboards/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:252:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there anything else to try?

korpx-z commented 2 years ago

@helix-loop I would suggest installing the chromedriver binary and using these flags when attempting the bootstrap..

wget <chromedriver.zip>
unzip -d /tmp/ chromedriver.zip
CHROMEDRIVER_FILEPATH=/tmp/chromedriver CHROMEDRIVER_SKIP_DOWNLOAD=true yarn osd bootstrap
helix-loop commented 2 years ago

OS / architecture Debian Bullseye / ppc64le

OpenSearch-Dashboards version 1.3.0-SNAPSHOT

Thank you @korpx-z. Installing chromedriver-binary (https://pypi.org/project/chromedriver-binary/) via pip and building with CHROMEDRIVER_FILEPATH=$PATH:"chromedriver-path" CHROMEDRIVER_SKIP_DOWNLOAD=true yarn osd bootstrap worked.

I was then able to start OpenSearchDashboards via yarn start using OpenSearch as described in https://github.com/opensearch-project/OpenSearch/issues/1303. Is there a way forward in building this as artifacts as described at https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md#building-the-artifacts ?