My main objective is to integrate grunt-html-validation
into my project, and my general goal is to understand how to enforce npm package dependencies installation.
I embarked on this journey due to encountering high-risk errors when running npm audit
related to qs. Upon executing npm install request@latest
and npm install qs@latest
, I encountered no errors. However, even after doing so, the output of npm list qs did not showcase the anticipated outcome, which would be for qs to be updated to a recent version as indicated by the npm audit
.
Command#1:
sudo npm install qs
outputs:
npm WARN <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b8dfcacdd6cc95d0ccd5d495ced9d4d1dcd9ccd1d7d6f8889689968980">[email protected]</a> requires a peer of grunt@~0.4.1 but none is installed. You must install peer dependencies yourself.
+ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b1c0c2f1879f849f83">[email protected]</a>
added 1 package from 1 contributor, updated 1 package and audited 623 packages in 4.014s
found 19 vulnerabilities (3 low, 10 moderate, 6 high)
Command #2:
sudo npm install request@latest
outputs:
+ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c9bbacb8bcacbabd89fbe7f1f1e7f9">[email protected]</a>
updated 1 package in 2.584s
Command#3:
npm list qs
outputs:
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3f584d4a514b12574b525312495e53565b5e4b5650517f0f110e110e07">[email protected]</a>
|
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="225047535747515662100c11160c12">[email protected]</a>
|
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6d7d5e69688908890">[email protected]</a>
Some observations and questions arising from my troubleshooting: - Why is
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="284f5b6818061e061e">[email protected]</a>
not updating? It is at the end of the dependency chain. I even attempted deleting @my_project/node_modules/request/node_modules/qs
without success. I then modified @my_project/node_modules/request/package.json/dependencies/qs
to ~3.1.0
just to check if it would reflect in npm list qs. However, it did not, although @my_project/node_modules/request/node_modules/qs/package.json
now shows version 3.1.0
. I also performed npm cache clean multiple times.
- Why did not Command#1 update <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="354750444050464175071b06011b05">[email protected]</a>
in my dependency chain?
I am also encountering these warnings during
npm install grunt-html-validation
:
npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="214f4e45440c5454484561100f150f19">[email protected]</a>: Use uuid module instead
npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="066e69636d4636283f2837">[email protected]</a>: The major version is no longer supported. Please update to 4.x or newer
npm WARN <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a7c0d5d2c9d38acfd3cacb8ad1c6cbcec3c6d3cec8c9e797899689969f">[email protected]</a> requires a peer of grunt@~0.4.1 but none is installed. You must install peer dependencies yourself.