Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

607
Views
npm update is not updating the version in package.json file

I am trying to update specific package in my project. I have checked it using npm outdated and then I run this command to update this package: npm update nameofpackage i.e., npm update slugify.

My package.json file is not got updated after that, although when i run npm outdated again it shows no outdated package. It means it got updated but my package.json file still shows the older version of the package.

Please let me know how can I update my package.json file also. I have tried npm update slugify --save also but it didn't worked for me.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The objective of the npm update command is to update your package-lock.json according to what you have specified in the package.json file. This is the normal behavior.

If you want to update your package.json file, you can use npm-check-updates: npm install -g npm-check-updates.

You can then use these commands:

  1. ncu Checks for updates from the package.json file
  2. ncu -u Update the package.json file
  3. npm update --save Update your package-lock.json file from the package.json file
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!