I was Having a similar issue with the import, i forgot to add the .js extention.
The issue is due to the fact that the OrbitControls module is a JavaScript file, but the import statement is missing the .js extension.
To resolve this issue, I simply added the .js extension after a lot of silly debugging here and there, even installed three/examples package which ofcourse, is either deprecated or did never exit.
the updated import looks like this:
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
however i did encounter how even this import module was officially updated before it was something else.
By adding the .js extension, you're telling the module resolver to look for a JavaScript file with that name, which should resolve the error.
Explanation When importing modules in JavaScript, the module resolver will look for files with the specified name, but it may not always infer the correct file extension. In this case, the OrbitControls module is a JavaScript file, but the import statement was missing the .js extension, leading to the error.
By adding the .js extension, you're providing explicit instructions to the module resolver, ensuring that it finds the correct file.