Install and Require Helmet Exercise

Hi everybody, I was trying to upload my live app URL from Replit to the install and required helmet exercise, but I kept getting helmet version 3.21.3 should be in package.json error even though I added it in dependencies. The code seems to be working fine and I got the ‘your app is listening on port 3000’ message. When I checked the installed package section, a different version of the helmet was installed. I think that’s why it’s not working. Does anyone know how to change the version?

HI @yodahebeyene !

Welcome to the forum!

You can uninstall helmet and then install it again.

Try npm uninstall helmet@3.21.3 and see if it uninstalls the package.
If not then just delete it manually from the left hand side in the installed packages of replit and removing it from the package.json file.

Then install it again.
npm i helmet@3.21.3

Hi @jwilkins.oboe

Thanks for the suggestion!

I followed the steps, but for some reason, it keeps installing version 4.6.0.
I have no idea why.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.