Hello everyone,
I’m currently stuck on the “Install and Set Up Mongoose” challenge. The tests keep failing even though my project seems configured correctly and MongoDB is connected.
What FCC reports (both fail):
1) “mongoose” version ^5.11.15 dependency should be in package.json
2) “mongoose” should be connected to a database
My setup:
- Hosting the projects on Railway (also tested with Render and Replit).
- package.json includes: “mongoose”: ^5.11.15”, along with “express” and “dotenv”.
- App starts with node server.js.
- In myApp.js, I connected with:
mongoose.connect(process.env.MONGO_URI, {
useNewUrlParser: true,
useUnifiedTopology: true
});
- MONGO_URI is set in the host environment. Password is URL-safe, database name (fccdb) is added after .net/ and before the ?
- Logs from the host show: “MongoDB connected”
Verification (live evidence):
- When I open my deployed endpoint for /api/package.json, it clearly shows “mongoose”: “^5.11.15”
- When I open my deployed endpoint for /api/is-mongoose-ok, it returns {“isok”: true, “readyState”: 1}
What I’ve already tried:
- Rotated Atlas password, re-encoded it, and updated MONGO_URI.
- Tried multiple hosts (Render, Replit, Railway).
- Confirmed that Atlas cluster is accessible and whitelist allows all IPs.
- Confirmed helper routes are working (I can see both package.json contents and mongoose connection state).
At this point, everything matches the instructions and works outside FCC. But the FCC test runner doesn’t seem to detect the version or connection.
My question:
Is this a known issue with the test runner? Are there specific requirements about hosting providers, endpoint path, or headers that could cause FCC not to detect the setup even through it’s working?
Any guidance would be greatly appreciated!
PS: I want to apologize for the very long post. I’ve been stuck and working on this lecture for days and the frustration has been increasing through the roof. I just want to make sure I’ve explained everything clearly so others can understand the situation and hopefully help me figure out what’s going wrong.
Thanks in advance!
W