morrowdigital / watermelondb-expo-plugin

125 stars 30 forks source link

[fix] prebuild error fix for app name with spaces #11

Closed billjohnston closed 1 year ago

billjohnston commented 1 year ago

Fix for this error I was getting during prebuild:

- Config syncing
✖ Config sync failed
[stderr] [12:32:43] [ios.dangerous]: withIosDangerousBaseMod: ENOENT: no such file or directory, open '/Users/expo/workingdir/build/ios/My App Name/wmelon.swift'
[stderr] [12:32:43] Error: [ios.dangerous]: withIosDangerousBaseMod: ENOENT: no such file or directory, open '/Users/expo/workingdir/build/ios/My App Name/wmelon.swift'
[stderr] error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn exited with non-zero code: 1

Think it was associated to my app name having spaces and this code:

config.modRequest.projectRoot + "/ios", config.name.replace("-", "")

Was returning an incorrect projectName

Kinda new to RN and am happy to make edits to this if anyone has more context