Hi,
Can you tell me - How to upgrade the moment.js version in angular .
Thanks
Hi,
Can you tell me - How to upgrade the moment.js version in angular .
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jayraj ChhayaRank #304 · 8.2K reputationPosted Jan 23, 2024, 2:53 AM EST
To upgrade the Moment.js version in an Angular project, you can follow these steps:
package.jsonfile. Locate thedependenciessection and find the entry for Moment.js. Change the version number to the desired version you want to upgrade to. For example:"dependencies": { "moment": "^2.29.1", ... }Save the changes to the
package.jsonfile.Run the following command in your project's root directory to install the updated version of Moment.js:
This command will fetch the latest version of Moment.js and update it in your project's
node_modulesdirectory.By following these steps, you should be able to successfully upgrade the Moment.js version in your Angular project.
Sathish Kumar M18 reputationPosted Jan 23, 2024, 3:15 AM EST
Thanks Jayraj.
But I do have one version in package-lock.js as well and that holds the correct version, so will it good to upgrade package.json version alone and give npm install.
please advise
Sathish Kumar M18 reputationPosted Jan 24, 2024, 1:40 AM EST
Hi,
How to upgrade the moment version to 2.29.4 under exceljs in package-lock.json file

Thanks