Why is threejs lighting fun such as pointlight and ambientlight not working with version “three”: “^0.164.1”

I was doing my very first threejs small project with vite and threejs library

I added these light function in js file,

`// emit light evenly in all directions from specific point in space
const pointLight = new Three.PointLight( 0xff0000, 1, 100 );
pointLight.position.set(5, 5, 5);



// to spread the lighting across the entire scene
const ambientLight = new Three.AmbientLight(0xffffff);
scene.add(pointLight, ambientLight);`

Inside of package.json,

{
  "name": "three-demo",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  "devDependencies": {
    "vite": "^5.2.0"
    
  },
  "dependencies": {
    "three": "^0.128.0"
  }
}

The problem is that the lighting function works perfectly with three dependencies “three”: “^0.128.0” but when changes to latest version “three”: “^0.164.1” and run npm install, then the lighting function not working