Adding to my previous post:
Here are some diagnostics you can try or consider:
1. For iMovie 10, open iMovie while holding down the Option and Command keys and selecting to delete preferences in the box that appears. iMovie will open in a new library. Reopen your old library to get back to your projects. Now see if you can export.
2. Again for iMovie 10, in your projec do an Edit/Select All, Edit/Copy, and paste your project media into a newly created project and try to share out.
3. Open iMovie in a new user account. The Guest account on your Mac will suffice for this purpose.
4. You might try booting up in Safe Mode (see Help menu) and, after everything has loaded, immediately shut down and reboot in normal mode. See if iMovie works properly.
5. Often export problems occur because of corruption in the project media. Try scrolling slowly through your project, looking for white flashes, black frames, artifacts and other signs of corruption. If you find anything, cut it out of the project and try to export again.
6. Make sure that you have enough space on your boot drive for iMovie to function and enough space on your destination drive to receive the movie. 20GB to 25GB is often recommended.
7. Do a first aid repair, using the Disk Utility app on your Mac. It is found in the Disk Utilities folder located in the Applications folder.
8. Update iMovie and your operating system to current versions. That would be iMovie 10.1.9 and Mojave.
Good luck with this.
-- Rich