`Error creating target Swift AST context: (null)` in REPL `Error creating target Swift AST context: (null)` in REPL swift swift

`Error creating target Swift AST context: (null)` in REPL


To see your current Xcode path:

xcode-select -p

Mine was an old path:

/Applications/Xcode.app/Contents/Developer

Then update this path via:

sudo xcode-select -s /Library/Developer/CommandLineTools