superset icon indicating copy to clipboard operation
superset copied to clipboard

Was unable to import superset Error: [Errno 20] Not a directory: '/home/superset/superset/static/assets/package.json'

Open mikexfreeze opened this issue 7 years ago • 10 comments

Superset version

release--0.3

Expected results

Actual results

fail run

Steps to reproduce

git clone https://github.com/apache/incubator-superset/ cd incubator-superset/contrib/docker # prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples: docker-compose run --rm superset ./docker-init.sh # you can run this command everytime you need to start superset now: docker-compose up

in the end of docker-compose run --rm superset ./docker-init.sh after create user command: "Was unable to import superset Error: [Errno 20] Not a directory: '/home/superset/superset/static/assets/package.json'" then docker-compose up run failed with some node.js error.

it looks like in docker-compose.yml: # this is needed for development, remove with SUPERSET_ENV=production - ../../superset:/home/superset/superset copy command didn't work, I found below superset/static path there is a alias file, my system is ubuntu 16. and I run those well on macOX. is there any idea about what's going on? thanks a lot

mikexfreeze avatar Feb 25 '19 07:02 mikexfreeze

Hi,

This is the issue when I tried to do the build on Windows as well. It seems the issue comes from file '/home/superset/superset/static/assets' being created as a soft link to point to ../assets (which is actual directory where all assets are there).

The soft links doesn't seem to work well on Windows. So i believe the same may be the issue in Ubuntu.

For me, the way i have overcome this issue is to remove the 'assets' file in /home/superset/superset/static/assets and copy the '/home/superset/superset/assets' directory to '/home/superset/superset/assets' and after that all my builds worked.

kirankumarpv avatar Feb 25 '19 19:02 kirankumarpv

same problem, do you have better solution?

brahmachen avatar Feb 26 '19 02:02 brahmachen

@kirankumarpv thank you, yesterday I do the same thing now it can run.

mikexfreeze avatar Feb 26 '19 02:02 mikexfreeze

A better solution is, you can create a Directory Junction by this command on Windows: >mklink /J "assets" "../assets" then add this folder into .gitignore

brahmachen avatar Feb 28 '19 07:02 brahmachen

#6225 related

kuz30 avatar Apr 23 '19 06:04 kuz30

I tried both the mklink command and copy the assets directory into that didn't work. I was able to get this working is by adding this line to the docker-compose.yml file under volumes.

- ../../superset/assets:/home/superset/superset/static/assets

hinzinho avatar May 01 '19 03:05 hinzinho

copy the contents of the \incubator-superset-master\superset\assets folder in incubator-superset-master\superset\static\assets and renaming the assets to assets2 file for example

jmleandrocr avatar Jun 07 '19 16:06 jmleandrocr

A better solution is, you can create a Directory Junction by this command on Windows: >mklink /J "assets" "../assets" then add this folder into .gitignore

Need to switch to the directory incubator-superset\superset\static and delete or remove the assets file. Then issue the command mklink /J "assets" "../assets" in cmd

mingchaowen avatar Jul 10 '19 08:07 mingchaowen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Sep 08 '19 09:09 stale[bot]

I encounter a similar issue with /app/superset/static/assets/version_info.json. https://github.com/apache/incubator-superset/issues/8804#issue-535986551

sarithapodali avatar Dec 10 '19 20:12 sarithapodali