The code work just fine but I'm getting an annoying warning and I want to get rid of it. I have no idea why its there. I've used three.js in other projects and it worked just fine.
I did npm i -D @types/three as usual but it didn't fix my problem so I out of ideas.
EDIT:
Picture of the code
The version of three.js in package.json "three": "^0.151.3"