'Mapbox "invalid location for binary target" error during Fastlane build resolving spm dependency

I'm receiving this error while xcode tries to resolve Swift Package Manager dependencies with these command:

xcodebuild -resolvePackageDependencies -workspace MyWorkspace.xcworkspace -scheme MyScheme

Fetching from https://github.com/mapbox/mapbox-core-maps-ios.git

invalid location for binary target 'MapboxMobileEvents' in https://github.com/mapbox/mapbox-events-ios.gitxcodebuild: error: Could not resolve package dependencies:
  invalid location for binary target 'MapboxMobileEvents' in https://github.com/mapbox/mapbox-events-ios.git

I don't understand how to fix this issue, I neither found too much on the web.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source