Can't import mbed-dev for STM32 NUCLEO-F103RB board

I can build my project with the library but I want to get the source so that I can export it and build offline.

When I try to import mbed-dev I get this error:

Server responded with failure code 504 - Gateway Timeout

Is there some other way to import the library sources?

If you export your project the mbed.lib will be replaced with the source. No need to pull in mbed-dev before exporting.

If you want to do some serious offline dev checkout mbed-cli. you can simply mbed import URL where url is the url of your project and it’ll pull it down for you, with full sources.