Redash self hosted install on Ubuntu 18.04 using WSL2 fails at npm install

So I’ve been struggling for a number of days following this guide:

I was able to get Redash server running, but since I cannot install node modules the frontend does not build npm run build.

I am getting this error when I get to npm install:
src/visualizations/table/Renderer.tsx:130:9 - error TS2578: Unused ‘@ts-expect-error’ directive.

130 // @ts-expect-error ts-migrate(2322) FIXME: Type '{ key: any; dataIndex: string; align: any; s… Remove this comment to see the full error message

I have tried jst about everything from deleting node_modules to reinstalling nodejs on my Ubuntu instance. I am now at a deadlock and have no idea why this is an issue. Please can you assist.

UPDATE: This process fails at tsc emitDeclarationOnly

1 Like

I have started a fresh installation.

cannot build the frontend at all, here are the logs:

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘run’, ‘build’ ]
2 info using npm@6.14.11
3 info using node@v14.16.0
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle redash-client@9.0.0-beta~prebuild: redash-client@9.0.0-beta
6 info lifecycle redash-client@9.0.0-beta~build: redash-client@9.0.0-beta
7 verbose lifecycle redash-client@9.0.0-beta~build: unsafe-perm in lifecycle true
8 verbose lifecycle redash-client@9.0.0-beta~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/christine/redash/new_redash/redash/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle redash-client@9.0.0-beta~build: CWD: /home/christine/redash/new_redash/redash
10 silly lifecycle redash-client@9.0.0-beta~build: Args: [
10 silly lifecycle ‘-c’,
10 silly lifecycle ‘npm run clean && npm run build:viz && NODE_ENV=production webpack’
10 silly lifecycle ]
11 silly lifecycle redash-client@9.0.0-beta~build: Returned: code: 2 signal: null
12 info lifecycle redash-client@9.0.0-beta~build: Failed to exec build script
13 verbose stack Error: redash-client@9.0.0-beta build: npm run clean && npm run build:viz && NODE_ENV=production webpack
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid redash-client@9.0.0-beta
15 verbose cwd /home/christine/redash/new_redash/redash
16 verbose Linux 5.4.72-microsoft-standard-WSL2
17 verbose argv “/usr/bin/node” “/usr/bin/npm” “run” “build”
18 verbose node v14.16.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 2
22 error redash-client@9.0.0-beta build: npm run clean && npm run build:viz && NODE_ENV=production webpack
22 error Exit status 2
23 error Failed at the redash-client@9.0.0-beta build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

Some input would be greatly appreciated as I am still nowhere closer to visualizing any data

Hi, those instructions don’t appear to have been updated since May 2020 so are probably based on the Redash 8 release. Redash 9 is still a beta version and I don’t think any of the documentation has been updated since for that release.
If you just want to get it working locally to try it out, maybe try with a v8 release e.g.
git clone --branch v8.0.2 https://github.com/getredash/redash.git

1 Like

I wonder if part of this is a limitation of WSL? V9 builds fine with a single command on stock ubuntu…

Yeah I think it’s a WSL limitation since I was able to get it running on stock standard Ubuntu machine as well. Still no luck running any version using WSL so going to conclude at that.

Even I am facing the same issue. Was this resolved?