Gee-Max
September 21, 2020, 3:26pm
1
Tell us what’s happening:
the current version of Helmet is 4.1.1 and the exercise if looking for version 3.21.3 I get this msg helmet
version 3.21.3
should be in package.json
I cannot find out how to install an earlier version of Helmet.
any help would be appreciated I tried it on edge and chrome same error,
Your code so far
https://repl.it/@GeeMax/BlankCyberKeyboardmapping
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
.
Challenge: Install and Require Helmet
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
jenovs
September 21, 2020, 4:36pm
2
Just open package.json
and change version.
Or install exact version:
npm i helmet@3.21.3
Gee-Max
September 21, 2020, 4:46pm
3
jenovs:
npm i helmet@3.21.3
thanks for your reply to my question, I have ran the above command and made sure the correct code is in myApp.js but I still get the message, helmet
version 3.21.3
should be in package.json
Thanks,
nibble
September 21, 2020, 4:51pm
4
Hi @Gee-Max . Try changing the version of helmet
in package.json
manually so that it becomes "helmet": "^3.21.3"
. Save and click run.
jenovs
September 21, 2020, 4:52pm
5
Then you’re probably submitting the wrong repl.it link. Try the one from the preview pane.
Gee-Max
September 21, 2020, 5:47pm
6
tried it with both links same outcome,
what is it that you have to put in the myApp.js file ?
this is what I am putting in there.
const helmet = require(‘helmet’);
Gee-Max
September 21, 2020, 5:47pm
7
Hi nibble, I have tried that it didn’t work.
Thanks
Sky020
September 21, 2020, 5:48pm
8
Welcome, Gee-Max.
The version number cannot have any carets (^
) or tildes (~
).
This command should help:
npm install --save-exact helmet@3.21.3
Hope this helps
Gee-Max
September 21, 2020, 5:54pm
9
Hi @Sky020 this worked thanks very much, how come it didn’t work when it included the caret(^) before the version number ?
Sky020
September 21, 2020, 9:05pm
10
Unfortunately, it is the way the tests have been written:
text: '<code>helmet</code> version <code>3.21.3</code> should be in <code>package.json</code>'
testString: getUserInput => $.get(getUserInput('url') + '/_api/package.json').then(data => { var packJson = JSON.parse(data); assert(packJson.dependencies.helmet === '3.21.3' ); }, xhr => { throw new Error(xhr.responseText); })
We are planning on fixing this.
Gee-Max
September 22, 2020, 11:34am
11
Ah ok, thanks for your help
pls help me i’m having the same problem my version of helmet in package.json has no caret yet when i submit on freecodecamp, it still says
helmet version 3.21.3 should be in package.json
this is my repl.it https://repl.it/@gloryeziani/boilerplate-infosec#myApp.js
pls help!!