Home > Software engineering >  how to update @types/node to latest version
how to update @types/node to latest version

Time:03-07

when I check the command "npm outdated" the output is always " @types/node 14.18.12" how to update @type/node to the latest version eg now version 17.0.21 enter image description here

CodePudding user response:

In your package.json file there should be an entry for @types/node, like:

"@types/node": "^14.18.12",

Change that to the new version:

"@types/node": "^17.0.21",

Then in the console, cd into the directory that contains package.json and run npm install.

CodePudding user response:

you can use

npm update

it will update all the outdated packages to the latest version,

npm update @types/node

this will update this specific package.

  • Related