Npm is stuck in @types version 0.144.0

I used npm install --save @types/three as suggested here:
https://www.npmjs.com/package/@types/three?activeTab=readme

which claims that the version of @types is 0.156.0, and got 0.144.0 instead, no matter what I tried.
(I verified it with ‘npm list’, also looked at @types’ package.json)

I even overwritten @types’ ‘three’ folder from copying it from here:
https://github.com/three-types/three-ts-types

and got an npm error as the package.json is different, and who knows what else…

It seems to me that there is a bug in npm that keeps installing @types version 0.144.0.
Does anyone know how to overcome this frustrating issue?

Are you installing this within an existing project?

Perhaps check that your package.json file is not set to restrict to a particular version. Or if there is a package-lock.json file, try deleting that and running npm install again.

Thanks, but that didn’t work, it installed 0.144.0 again (indeed, I was trying to update an existing project).
I figured that another parameter is somewhere hidden, so it just came to me:

  • npm uninstall @types/three
  • npm install --save @types/three

(Then ‘npm list’ to verify).

That did it, both three.js and @types’ versions agree now… and it’s 5:00+ A.M here… time to go to bed! :sleeping: