Issue
I am working on a project and plan to use Ionic to make the mobile app. I started by using
ionic start project-name tabs --type=react --capacitor
and I got 27 vulnerabilities, out of which 18 high and one critical. I have tried using "npm audit fix" and whatever else they recommended but none of that fixed anything. Is this something I should be worried about? I am not sure which of those deprecated libraries I will need over the course of the project so doing it manually seems very time consuming.
Solution
Personally I do four things when I start a project:
I run https://www.npmjs.com/package/npm-check-updates If you install this package, you will be able to run
ncu
and get a list of packages which need updating. You can also runncu -u
to automatically edit the pacakage.json for you.I also lock my dependencies. Meaning, I remove all '~' and '^' values from my package.json. Nothing more frustrating than to have a project suddenly stop working because a '^' pushed you to a later version which breaks something.
Run
npm i
in order to install the latest from package.Spend the next day or so fixing the various build and linting errors, but that's outside the scope of this question.
Answered By - E. Maggini
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.