The CreateMap method returns a baseMapLayers undefined error when a basemap layer is absent.
Bug ID Number
December 22, 2014
December 1, 2020
After review by the development team, it has been determined that this issue is related to a known limitation with the software that lies outside of Esri's control. The issue's Additional Information section may contain further explanation.
Webmaps require a basemap. However, an operational layer can be used as a basemap layer.
Create a web map in ArcGIS Online and use an operational layer as a basemap layer.