This seems similar to some other questions but in their cases they're doing things differently than I.
When trying to debug or run a reactjs project with Intillij I receive the following message on run:
import logo from './logo.svg';
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1084:15)
at Module._compile (node:internal/modules/cjs/loader:1119:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
I left the debug config to default with:
In vscode I have the following debug config which does work:
"name": "Launch Chrome against localhost",
All the code for my react app is in ./src. Apologies - I suspect I'm missing something obvious but it's not clear to me based on the error message what it is.