Fails npm run build

Hi!, I try to test redash v8 beta2, but I can’t build npm packages, I try many times and many ways; reinstall node, node clean; delete node_modules and package-lock.json, install optional dependencies but I can’t pass, here errors:

npm install
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated @mapbox/gl-matrix@0.0.1: This
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated os-homedir@2.0.0: This is not needed anymore. Use `require('os').homedir()` instead.

> core-js@2.6.9 postinstall F:\virtuals\redashb\node_modules\core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN leaflet.markercluster@1.4.1 requires a peer of leaflet@~1.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.0.2 requires a peer of acorn@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 828 packages from 484 contributors and audited 907703 packages in 138.456s
found 11 vulnerabilities (10 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

I try to install the dependencies but fsevents never installs.

I try to run the build, npm run build and have this errors:
PS > npm run build

> redash-client@8.0.0-beta.2 build F:\virtuals\redashb
> npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack


> redash-client@8.0.0-beta.2 clean F:\virtuals\redashb
> rm -rf ./client/dist/

"NODE_ENV" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! redash-client@8.0.0-beta.2 build: `npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redash-client@8.0.0-beta.2 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!     C:\Users\Jorge Copia\AppData\Roaming\npm-cache\_logs\2019-09-22T17_58_32_047Z-debug.log

My machine is a Windows 10 64 bits, Node version is : v10.16.3.

Try running npm install --no-optional. You don’t need fsevents. It’s an optional dependency and it only works on MacOS.

Note: Windows is not an official platform for Redash. People use Docker or a VM typically. But if you get it working, post a write-up! Several of us would like to hear how you did it :slight_smile:

Thanks, but not work to with this command :frowning:

I thought it might not. Can you use Docker instead?

I’m trying with a docker ubuntu image but I have new problems now.

In the docker settings, is 8GB ram, 3 CPUs; Image: ubuntu latest, node version v10.16.3.

Logs details

root@e7ffc86790d5:/var/www# cat /root/.npm/_logs/2019-09-23T06_15_45_738Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ ‘/opt/nodejs/bin/node’, ‘/opt/nodejs/bin/npm’, ‘run’, ‘build’ ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle redash-client@8.0.0-beta.2~prebuild: redash-client@8.0.0-beta.2
6 info lifecycle redash-client@8.0.0-beta.2~build: redash-client@8.0.0-beta.2
7 verbose lifecycle redash-client@8.0.0-beta.2~build: unsafe-perm in lifecycle true
8 verbose lifecycle redash-client@8.0.0-beta.2~build: PATH: /opt/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/nodejs/bin/
9 verbose lifecycle redash-client@8.0.0-beta.2~build: CWD: /var/www
10 silly lifecycle redash-client@8.0.0-beta.2~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@8.0.0-beta.2~build: Returned: code: 2 signal: null
12 info lifecycle redash-client@8.0.0-beta.2~build: Failed to exec build script
13 verbose stack Error: redash-client@8.0.0-beta.2 build: npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/opt/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/opt/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid redash-client@8.0.0-beta.2
15 verbose cwd /var/www
16 verbose Linux 4.9.125-linuxkit
17 verbose argv “/opt/nodejs/bin/node” “/opt/nodejs/bin/npm” “run” “build”
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 2
22 error redash-client@8.0.0-beta.2 build: npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack
22 error Exit status 2
23 error Failed at the redash-client@8.0.0-beta.2 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

You didn’t give Docker enough resources. It ran out of memory during the build the process. Why not use one of our images?

Only I need the frontend, which imaginedo I need to use? there are an imagen for webpack proceses?.

Any image should work. The front-end and back-end use the same base.