Installation: yarn build fails

Issue Summary

yarn build always fails. I had some problems which I resolved before, but maybe my changes are the reason yarn build fails. My knowledge about npm, yarn etc is basic. My best guess is that some of the dependencies are not working there. core-js? eslint-loader?

1 Unresolved issue: yarn build fails

I get a very long list of errors, I just took a few out, see below. I guess something in my setup is not correct?

My understanding is that yarn build produces the static pages, without it, I cant work with redash. I manage to get to the login page of localhost:5000, but once I provide my orga details, the server crashes (due to missing index.html).

I encountered a few issues earlier, and “fixed” them, but maybe they are the source of my problem now? see below, please.

ERROR in ./client/app/components/DynamicComponent.jsx
Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator.js' in '/home/np/tools/redash/redash/client/app/components'
 @ ./client/app/components/DynamicComponent.jsx 11:0-47
 @ ./client/app/components/ApplicationArea/ErrorMessage.jsx
 @ ./client/app/components/ApplicationArea/index.jsx
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

ERROR in ./client/app/components/BeaconConsent.jsx
Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator.js' in '/home/np/tools/redash/redash/client/app/components'
 @ ./client/app/components/BeaconConsent.jsx 4:0-47
 @ ./client/app/pages/home/Home.jsx
 @ ./client/app/pages/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

ERROR in ./client/app/components/TimeAgo.jsx
Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator.js' in '/home/np/tools/redash/redash/client/app/components'
 @ ./client/app/components/TimeAgo.jsx 3:0-47
 @ ./client/app/pages/admin/OutdatedQueries.jsx
 @ ./client/app/pages/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

2 Resolved issue by myself: docker-compose fails
Error:

The following packages have unmet dependencies:
 odbcinst1debian2 : PreDepends: multiarch-support but it is not installable
.... 

My solution, which I found on the internet, changing in the Dockerfile “python:3.7-slim” to “python:3.7.10-slim”. docker-compose up -d worked after that. Bad idea?

3 Resolved issue by myself: yarn --frozen-lockfile fails
Some kind of typescript error in:

viz-lib/src/visualizations/table/Renderer.tsx

Error message:

error TS2578: Unused '@ts-expect-error' directive

I just removed the “@ts-expect-error” from line 122 in the Renderer.tsx which was recommended on the internet. This way, yarn --frozen-lockfile worked (more). Bad idea?

4 Resolved issue by myself: yarn --frozen-lockfile fails
Error was that version “^12.0.0” was expected, and I had 14.16.1 as described in the documentation. So I just changed it to it. Bad idea?

Technical details:

Any help would be appreciated.

ok, I managed to resolve it! redash seems to work now :slight_smile:

One change I did previously, editing /viz-lib/src/visualizations/table/Renderer.tsx did cause problems later. I reverted it to the original in the repository.

After that, both these commands worked:

npm install --no-optional
yarn build

Now the login page is properly formatted and I can get through the registrations to the normal landing page!

1 Like