"npm run build" fails
See original GitHub issueWe are trying to build superset in production mode, but it fails.
Expected results
We expect npm run build
to succeed.
Actual results
It fails.
Screenshots
$ npm run build
> superset@0.999.0-dev build /home/.../incubator-superset/superset-frontend
> cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors
Starting type checking service...
Using 1 worker with 2048MB memory limit
92% chunk asset optimization OptimizeCssAssetsWebpackPluginBrowserslist: caniuse-lite is outdated. Please run next command `npm update`
92% chunk asset optimization TerserPluginnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! superset@0.999.0-dev build: `cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the superset@0.999.0-dev 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! /home/.../.npm/_logs/2020-06-16T13_54_45_886Z-debug.log
Unfortunately the logs don’t give much help either.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/.../.nvm/versions/node/v12.16.3/bin/node',
1 verbose cli '/home/.../.nvm/versions/node/v12.16.3/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v12.16.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle superset@0.999.0-dev~prebuild: superset@0.999.0-dev
6 info lifecycle superset@0.999.0-dev~build: superset@0.999.0-dev
7 verbose lifecycle superset@0.999.0-dev~build: unsafe-perm in lifecycle true
8 verbose lifecycle superset@0.999.0-dev~build: PATH: /home/.../.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/.../incubator-superset/superset-frontend/node_modules/.bin:/home/.../venv/bin:/home/.../.local/bin:/home/.../.nvm/versions/node/v12.16.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle superset@0.999.0-dev~build: CWD: /home/.../incubator-superset/superset-frontend
10 silly lifecycle superset@0.999.0-dev~build: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors'
10 silly lifecycle ]
11 silly lifecycle superset@0.999.0-dev~build: Returned: code: 1 signal: null
12 info lifecycle superset@0.999.0-dev~build: Failed to exec build script
13 verbose stack Error: superset@0.999.0-dev build: `cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/.../.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (/home/.../.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid superset@0.999.0-dev
15 verbose cwd /home/.../incubator-superset/superset-frontend
16 verbose Linux 5.4.0-37-generic
17 verbose argv "/home/.../.nvm/versions/node/v12.16.3/bin/node" "/home/.../.nvm/versions/node/v12.16.3/bin/npm" "run" "build"
18 verbose node v12.16.3
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error superset@0.999.0-dev build: `cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors`
22 error Exit status 1
23 error Failed at the superset@0.999.0-dev build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
How to reproduce the bug
- Clone repository (we tried both
master
and0.36
branches separately) - Go to
incubator-superset/superset-frontend
- Run
npm i
- Run
npm run build
- See error
Environment
- superset version: latest
- python version:
3.8.2
- node.js version:
12.16.3
- npm version:
6.14.5
Checklist
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
npm run build - fails to compile despite development version ...
I have a react app created with create-react-app , and npm run build is failing to compile a production build. It throws the...
Read more >`npm run build` is failing on CI but runs fine on local machine
Hey I got really weird problem. I use CRA with TypeScript template. I cannot build my app using npm run build on Github...
Read more >npm run build command fails - Salesforce Stack Exchange
x.x/guide/getting-started/ and when I run the npm run build command I get an error "NODE_ENV" is not recognized as an internal or external ......
Read more >Error when running npm run build : r/react - Reddit
Error when running npm run build · Delete package-lock.json (not package.json!) and/or yarn. · Delete node_modules in your project folder. · Remove ...
Read more >superset build failures - npm run build - Google Groups
cd $SUPERSETHOME/superset/assets. npm install # this works fine · npm run build # this step errors out · Error: + 2221 hidden modules...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also failed to compile, The lastest commit on Master branch.
npm debug log.
Hi @willbarrett , sure, I have installed Ubuntu Server 20.04 inside a VMWare, with 4 CPUs, 4 GB of RAM, and 30 GB of hard disk space.
Make sure everything essential is installed :
Then install NodeJS
(Note: version may change, but will be 12.x)
Then create your Python3 virtual environment, and activate it :
(Note: Python version may change, but it will be 3.x)
After that, simply clone this repository and start it :
Wait for a ton load of output, and you’ll have superset up and running on your VM’s IP address on port 8088. Make sure your VM’s network adapter is configured to expose it to your local network. You can check the VM’s IP address with :
(Note: you don’t really need NodeJS until you want to build Superset locally. With NodeJS installed, you can go into the superset frontend and build it :
This last command is what fails for me.
As for the rest, I’ll leave it up to you to discover and set it up. Please, do share your findings.