While install REDASH when Using Docker in run command :

root@Test-LITE:/home/redash# npm run build

redash-client@6.0.0 build /home/redash
npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack

redash-client@6.0.0 clean /home/redash
rm -rf ./client/dist/

(node:6277) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
Killed
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! redash-client@6.0.0 build: npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the redash-client@6.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-12-24T12_01_28_134Z-debug.log

showing file : /root/.npm/_logs/2018-12-24T12_01_28_134Z-debug.log
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.5.0
3 info using node@v8.14.0
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle redash-client@6.0.0~prebuild: redash-client@6.0.0
6 info lifecycle redash-client@6.0.0~build: redash-client@6.0.0
7 verbose lifecycle redash-client@6.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle redash-client@6.0.0~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/redash/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle redash-client@6.0.0~build: CWD: /home/redash
10 silly lifecycle redash-client@6.0.0~build: Args: [ ‘-c’,
10 silly lifecycle ‘npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack’ ]
11 silly lifecycle redash-client@6.0.0~build: Returned: code: 137 signal: null
12 info lifecycle redash-client@6.0.0~build: Failed to exec build script
13 verbose stack Error: redash-client@6.0.0 build: npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack
13 verbose stack Exit status 137
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid redash-client@6.0.0
15 verbose cwd /home/redash
16 verbose Linux 4.13.0-37-generic
17 verbose argv “/usr/bin/node” “/usr/bin/npm” “run” “build”
18 verbose node v8.14.0
19 verbose npm v6.5.0
20 error code ELIFECYCLE
21 error errno 137
22 error redash-client@6.0.0 build: npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack
22 error Exit status 137
23 error Failed at the redash-client@6.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]

Looks like your machine doesn’t have enough memory or doesn’t have enough memory allocated to Docker for the build process.

You can either allocate more memory or if this is not a development setup, use the prebuilt images (redash/redash).

Thanks

How I can get the prebuilt images ( redash/redash ) ?

https://hub.docker.com/r/redash/redash

but I need the detail steps and which Docker versions and type ?

Thanks in advance.

hello there,
how can i allocate more memory, i am using centos 7.
thanks in advance.

You can see on the Tags page all the published tags for this image. The latest one being: 6.0.0.b8537 (redash/redash:6.0.0.b8537). You can also just use redash/redash:latest, but it’s better to reference a specific tag so you can decide when to upgrade to a newer one.

First, you will have to remove the npm cache and upgrade to the latest version of the node and npm will resolve the issue.

sudo npm cache clean -f
sudo npm install -g n install n
sudo n stable

The first command will force clean the npm package manager’s cache, After the second and third commands, a stable version of the node and npm will be installed. then you can execute npm i and npm run build for creating an optimized production build.

This solution worked for the same error on the npm run build command in nextjs.