Snapraft filebug error when building Wekan snap

well, your error is:

IsADirectoryError: [Errno 21] Is a directory: '/build/wekan/stage/bin'

does that directory exists if you do a local build ?

Yes it exists.

When building locally, error is:

Staging caddy 
Staging helpers 
Staging mongodb 
Sorry, an error occurred in Snapcraft:
[Errno 21] Is a directory: '/home/wekan/repos/wekan/stage/bin'
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]:

And there is this directory:

root@xenial:/home/wekan/repos/wekan# ls stage/bin
caddy          mongodb-backup   wekan-control
caddy-control  mongodb-control  wekan-help
config         mongodb-restore  wekan-read-settings

I did add this to snapcraft.yaml to make sure that directory exists:

mkdir -p stage/bin

But I still get the same error. How can I fix it ?

well, you did put it into the override-build statement, but at that point you are in the <tree>/parts/wekan/build directory so your mkdir creates parts/wekan/build/stage/bin … what you want instead is to have it created in the parts/wekan/install dir that later gets copied into the stage dir like below:



Where in snapcraft.yaml I should add it? I still get the same error.

you should replace the other mkdir with it …

Can you add complete snapcraft.yaml how I would fix this, please?
I have been trying to fix Snap build for 5 days.

I removed extra comment lines from snapcraft.yaml .

With this, I get errors that directory exists:


And if I instead try to delete that directory, I get error cp not found