Incubator-superset: docker babel-node not found

Created on 5 Dec 2018  Â·  9Comments  Â·  Source: apache/incubator-superset

/bin/sh: 1: babel-node: not found
where is the babel-node?seem like superset needs to execute the command babel-node

#bug .docker

Most helpful comment

All 9 comments

I FOUND it under HOME directory using git , but it not copy to the docker container and not add it to the ENV

I get the same error ,can anyone help me ?

[email protected] sync-backend /home/superset/superset/assets
babel-node --presets env src/syncBackend.js

sh: 1: babel-node: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] sync-backend: babel-node --presets env src/syncBackend.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] sync-backend script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Same error on Ubuntu 14.04.5 LTS using latest docker version

Docker version 18.06.1-ce, build e68fc7a
docker-compose version 1.23.1, build b02f1306


> [email protected] sync-backend /home/superset/superset/assets
> babel-node --presets env src/syncBackend.js

sh: 1: babel-node: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT

â–½
npm ERR! syscall spawn
npm ERR! [email protected] sync-backend: `babel-node --presets env src/syncBackend.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] sync-backend 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/superset/.npm/_logs/2018-12-26T06_53_45_563Z-debug.log
ERROR: Service 'superset' failed to build: The command '/bin/sh -c cd superset/assets     && npm ci     && npm run sync-backend     && npm run build     && rm -rf node_modules' returned a non-zero code: 1

How to resolve this probleam?

The issue is the same as mine

Same error for me.
Any help on how to fix this would be awesome.

Looks like this PR might have caused the issue: https://github.com/apache/incubator-superset/pull/6541
babel-cli got upgraded from 6.x.x to 7.x.x which doesn't include the babel-node executable any more.

Even after including the babel node separately, I couldn't resolve it. So i had to install @babel/preset-env, @babel/preset-react
npm install -- save-dev @babel/node
npm install -- save-dev @babel/preset-env
npm install -- save-dev @babel/preset-react

and change the presets on the .babelrc like below to fix the issue.
"presets" : ["@babel/preset-env","@babel/preset-react"],

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbrian picture gbrian  Â·  3Comments

kalimuthu123 picture kalimuthu123  Â·  3Comments

amien90 picture amien90  Â·  3Comments

josephtyler picture josephtyler  Â·  3Comments

shyam2794 picture shyam2794  Â·  3Comments