添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

While install REDASH when Using Docker in run command :

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

[email protected] build /home/redash
npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack

[email protected] 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! [email protected] 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 [email protected] 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 [email protected]
3 info using [email protected]
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~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 [email protected]~build: CWD: /home/redash
10 silly lifecycle [email protected]~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 [email protected]~build: Returned: code: 137 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] 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 [email protected] 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.

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 ?

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.