Ts error on intensity and angle of light (version 0.165 & 0.149)

Hi,

Intensity and angle types are not found for me in the code below. The error is Type ‘{ intensity: number; }’ is not assignable to type ‘AmbientLightProps’.
Property ‘intensity’ does not exist on type ‘AmbientLightProps’.ts(2322)

<>
      <ambientLight intensity={1} />
      <spotLight position={[10, 10, 10]} angle={45} penumbra={0} />

here’s my config:

"dependencies": {
    "@babel/preset-env": "^7.24.5",
    "@babel/preset-react": "^7.24.1",
    "@react-three/cannon": "^6.6.0",
    "@react-three/drei": "^9.74.12",
    "@react-three/fiber": "^8.16.2",
    "@react-three/postprocessing": "^2.16.2",
    "@react-three/test-renderer": "^8.2.1",
    "@testing-library/jest-dom": "^6.4.5",
    "@testing-library/react": "^15.0.7",
    "babel-jest": "^29.7.0",
    "gl-react": "^5.2.0",
    "jest": "^29.7.0",
    "jest-environment-jsdom": "^29.7.0",
    "next": "^14.2.3",
    "next-unused": "^0.0.6",
    "postprocessing": "^6.35.4",
    "react": "^18.3.1",
    "react-cookie": "^7.1.4",
    "react-cookiebot": "^1.0.10",
    "react-dom": "^18.3.1",
    "react-responsive": "^10.0.0",
    "three": "^0.165.0",
    "zustand": "^4.5.2"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "^14.2.3",
    "autoprefixer": "^10.4.19",
    "glslify": "^7.1.1",
    "glslify-loader": "^2.0.0",
    "next-compose-plugins": "^2.2.1",
    "next-offline": "^5.0.5",
    "postcss": "^8.4.38",
    "tailwindcss": "^3.4.3"
  },

Do you know what is the problem ?

Try npm install @types/three@0.165.0 and restarting VSCode - works perfectly on a blank project.

1 Like

Thanks sorry