No Space Left on Device
This error is caused when your hard drive does not have sufficient space to install Minecraft or expand your world.
How to Solve this issue
This error is pretty self-explanatory — there is not enough “space” on your computer or wherever you are running the game from for storing information.
Minecraft requires at least 200MB for the core game and other files; more may be needed if you have large worlds. To clear disk space, try uninstalling rarely used applications and removing unused files. Alternatively, you can move Minecraft off onto another hard disk.
Clearing Disk Space
If you are on Windows, please see this guide by Microsoft on using “Disk Cleanup”, a tool for clearing up your hard disk: http://windows.microsoft.com/en-us/windows/delete-files-using-disk-cleanup
If you are on macOS, see this guide on freeing up storage space from Apple: https://support.apple.com/en-gb/HT206996
Moving Minecraft to another Hard Disk
If you wish to move Minecraft elsewhere instead, the following instructions will tell you how to do so.
Open the launcher, and select “Edit Profile”. You should see the Game Directory checkbox. Check that option, and put the directory you want Minecraft to save the worlds to there. Save and launch the game as normal. This will only move the resource pack folder and the saves folder over; the game and launcher files will not be moved over.