I tried multiple things. Hope my solution will come handy for you.
Blog
Out of that 2 ans are very interesting.
- from Sibiraj - (This is risky solution as you have to delete node modules and package-lock files. As after deleting this files when I ran the npm install I got error. Since I had the copy I recovered this files.)
This feature has been introduced in npm v5
. update to npm
using npm install -g npm@latest
and
to update package.json
delete /node_modules
and package-lock.json
(if you have any)
run npm update
. this will update the dependencies package.json
to the latest.
to update to very latest version. you can go with npm-check-updates
.
- From Andrei Gec (I did not tried this as I already went for option 1, but option 2 looks safe as it gives exact same file: I crossed checked)
If you're looking for an easier solution that doesn't involve installing npm packages, I'd checkout updatepackagejson.com
Solution to above problem run the below line of code. Link
npm install @mui/icons-material @mui/material @emotion/styled @emotion/react
I was getting error while running this in hyper as my package.json was not updated. And due package-lock even after running npm-check-updates
package.json did not got updated.