[ad_1]
I changed the file paths and can run my app from Xcode. However, when I try to run it in debug from VS Code it crashes throwing these errors:
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
Command EmitSwiftModule failed with a nonzero exit code
error: emit-module command failed with exit code 1 (use -v to see invocation)
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/App' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/Info.plist' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.json' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/FontManifest.json' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/NOTICES.Z' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/fonts/MaterialIcons-Regular.otf' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/kernel_blob.bin' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/lib/images/IMG-1124.jpg' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/vm_snapshot_data' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/FlutterMacOS.framework/Versions/A/FlutterMacOS' is located outside of the allowed root paths.
** BUILD FAILED **
Exception: Build process failed
Exited
I have found some answers recommending deleting, changing, and cleaning the DerivedData folder. I have tried cleaning my Xcode project and running, Deleting the DerivedData folder and running, renaming DerivedData Folder and saving relatively, and deleting specifically the ModuleCache.noindex folder in DerivedData.
None of these solutions have worked for me and I’m not sure why.
[ad_2]