0

As per the steps provided in the Superset Documentation, while following the Docker way of initializing the development environment, the following error occurs.

Have already tried using Node Version Manager to install npm, but still the error persists.

superset_1 | npm ERR! path /home/superset/superset/assets/node_modules superset_1 | npm ERR! code EACCES superset_1 | npm ERR! errno -13 superset_1 | npm ERR! syscall mkdir superset_1 | npm ERR! Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules' superset_1 | npm ERR! { [Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules'] superset_1 | npm ERR! cause: superset_1 | npm ERR! { Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules' superset_1 | npm ERR! type: 'OperationalError', superset_1 | npm ERR! '$error': '$error', superset_1 | npm ERR! cause: superset_1 | npm ERR! { errno: -13, superset_1 | npm ERR! code: 'EACCES', superset_1 | npm ERR! syscall: 'mkdir', superset_1 | npm ERR! path: '/home/superset/superset/assets/node_modules' }, superset_1 | npm ERR! isOperational: true, superset_1 | npm ERR! errno: -13, superset_1 | npm ERR! code: 'EACCES', superset_1 | npm ERR! syscall: 'mkdir', superset_1 | npm ERR! path: '/home/superset/superset/assets/node_modules' }, superset_1 | npm ERR! isOperational: true, superset_1 | npm ERR! stack: superset_1 | npm ERR! 'Error: EACCES: permission denied, mkdir \'/home/superset/superset/assets/node_modules\'', superset_1 | npm ERR! type: 'OperationalError', superset_1 | npm ERR! '$error': '$error', superset_1 | npm ERR! errno: -13, superset_1 | npm ERR! code: 'EACCES', superset_1 | npm ERR! syscall: 'mkdir', superset_1 | npm ERR! path: '/home/superset/superset/assets/node_modules' } superset_1 | npm ERR! superset_1 | npm ERR! The operation was rejected by your operating system. superset_1 | npm ERR! It is likely you do not have the permissions to access this file as the current user superset_1 | npm ERR! superset_1 | npm ERR! If you believe this might be a permissions issue, please double-check the superset_1 | npm ERR! permissions of the file and its containing directories, or try running superset_1 | npm ERR! the command again as root/Administrator (though this is not recommended). superset_1 | superset_1 | npm ERR! A complete log of this run can be found in: superset_1 | npm ERR! /home/superset/.npm/_logs/2019-01-05T05_09_30_276Z-debug.log superset_superset_1 exited with code 243

TylerH
  • 20,799
  • 66
  • 75
  • 101
Jai
  • 70
  • 1
  • 1
  • 11

1 Answers1

0

Had the same issue. I fixed it by removing command

USER superset    

from the Dockerfile (line 37).

In the docker-entrypoint.sh file I then added

su - superset

so that there was no funcionality lost, but I'm not sure if this is neccesary. My docker-entrypoint.sh file looks like this:

celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
# needed by superset runserver
(cd superset/assets/ && npm ci && npm run sync-backend)
(cd superset/assets/ && npm run dev) &
su - superset &
FLASK_APP=superset:app flask run -p 8088 --with-threads --reload --debugger -- 
host=0.0.0.0