Recently, Replit have adjusted their editor to no longer allow .env files to be created. As such, in order to use environment variables, a new tab in the left pane has been added which looks like a lock
@Sky020 I’d like to add another tip from my other thread for if you get the error “Hmmm… we couldn’t reach your repl”.
The boilerplate for many of the FCC projects includes the following line:
require("dotenv").config();
You need to remove this line as it attempts to load the environmental variables from a .env file (which we no longer have due to the introduction of REPLIT secrets). Once you remove this line your app should run correctly (given you followed the instructions above from @Sky020 correctly). Happy coding!
please I need someone’ help since I am exactly on that page of the course. I added the environmental variable with the if-else conditions and everything works correctly (infact i can see the message in uppercase in the myapp/json). However when I copy and paste the url for testing it does not pass the test . I have refreshed and restarted the app but with same poor result. What’s wrong?
If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.