I’m afraid I don’t know where to start. I’ve imported the project into Replit, “Use Run Command” was already selected, so I clicked “Done”. That’s when I first started having problems figuring out what to do next. I looked into some of the other posts and came across a response to type “npm install” into the console, so that’s what I did. I also accessed the replit of the woman that posted that same inquiry and copied her code into my Replit. My URL still fails the test. I’m stuck at this point.
Your repl is now throwing an error because you’re no longer using require to bring in your express dependency.
You need to require both express and helmet, separately.
Read the error message. How are you supposed to call express when it doesn’t exist in the code?
There is nothing magical about import/export. The export exports out some code, and the import (or require) brings in that code. You can not reference a function that doesn’t exist in the code.
As said, you need to require both express and helmet to be able to use them.
Added Helmet dependency - Run - Done - no vulnerabilities.
Is that the “working demo” that needs to be “hosted somewhere public” ? … and the URL to it submitted in the “Solution Link” field?
If so, how do I get the “working demo” hosted? Does it require some paid deployment - which in essence means whilst the challenge is free to do, it cannot be completed unless deployed (paid) - otherwise no URL to submit in the “Solution Link” field - is this interpretation correct?
If not, what needs to be done to get a “working demo” without deployment so it can be uploaded to some server visible online? …and then be able to put the URL to it in that Solution Link field to complete the challenge.
Any insight/help/answer is greatly appreciated.
Thanks.
Used Replit - Run - returns 0 vulnerabilities - looked for “New tab” (does nothing other than open a tab) - used the URL that was currently in the URL field of the browser when the project was “Run” in Replit and pasted that into the Solution Link field - clicked “…completed challenge” and the test result below that flagged the error as shown - says ’ helmet version 3.21.3 should be in package.json - but it is, has always been … came with the boiler-plate!
(please see attached pic)
Should be a straightforward 1-2-3 step if all it required was to embed the Helmet dependency in “myApp.js” and then Run it - turns out to be quite a challenge - maybe we missed something - grateful for any other insight/help into this. Thanks.
You will have to post a link to your Replit if you need help with the code.
Check the version didn’t change and maybe make sure the version number does not have any tilde (~) or caret (^) in front of it (can’t remember if it matters or not, but it might).
First, thank you for taking the time to look at this.
As mentioned earlier, the Helmet dependency (and version) was already in package.json as-is - came with the boiler-plate; the only ‘coding’ done was to call it (require) in myApp.js which was done (could be where the mistake is) - can you take a look at the screenshots attached.