Often times, this is related to package-lock.json
messing. I would suggest to try to:
-
Delete your
package-lock.json
-
Delete your
node_modules
folder -
Try
npm install
again
This used to fix several issues when adding new packages in my angular apps.
Good luck!
Please note that since then, a lot changed and there are now another option to use ncu
to consolidate updates. It could be worth trying before going with this solution.
The alternative solution is described in another response in this thread, please refer to it.