redash: Critical error with npm run build

Issue Summary

error TS2688: Cannot find type definition file for ‘jest’.

The debug log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@6.14.11
3 info using node@v12.20.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle redash-client@9.0.0-betaprebuild: redash-client@9.0.0-beta
6 info lifecycle redash-client@9.0.0-betabuild: redash-client@9.0.0-beta
7 verbose lifecycle redash-client@9.0.0-betabuild: unsafe-perm in lifecycle true
8 verbose lifecycle redash-client@9.0.0-betabuild: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/redash/redash-master/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle redash-client@9.0.0-betabuild: CWD: /opt/redash/redash-master
10 silly lifecycle redash-client@9.0.0-betabuild: 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-betabuild: Returned: code: 2 signal: null
12 info lifecycle redash-client@9.0.0-betabuild: 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/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid redash-client@9.0.0-beta
15 verbose cwd /opt/redash/redash-master
16 verbose Linux 4.18.0-240.1.1.el8_3.x86_64
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v12.20.1
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 ]

Steps to Reproduce

  • pip3 install -r requirements.txt -r requirements_dev.txt
  • npm install
  • npm run build

Technical details:

Redash Version: the last version Browser/OS: Ubuntu 18.04 How did you install Redash: Developer Installation Guide

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 30 (10 by maintainers)

Most upvoted comments

I have solved this problem, bros.

cd to the root folder of redash. Run the following command.

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
yarn install
yarn build

It is work like a charm.