-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIXED - Cannot read properties of null (reading 'previous_crashes') #6
Comments
To double check that the connection to mongodb is successfully, i added a console log. No errors and connection is successfull, yet.. still same error. |
I have same issue. Anyone knows how to create schemas on the MongoDB? |
I am getting the same error.
|
FIXED
I got the game running. I solved the issue this way.
1. At server.js add the following code after the MongoDB connection line:
Save it and run the server. It will now automatically generate the documents.
NOTE: The server will crash thats OK!
2. Now, copy the ID of the document and paste it in server.js at GAME_LOOP_ID.
3. Go to /models/game_loop.js and change:
const game_loop = new mongoose.Schema => const crashSchema = new mongoose.Schema
mongoose.model("game_loop", game_loop); => mongoose.model("Crash", crashSchema);
4. In the root folder, create an .evn file with the following line:
PASSPORT_SECRET = "YOURPASSWORDHERE"
5. Go back to server.js and delete or comment out the code you added in step 1.
6. Restart the server and enjoy. This is how it worked for me.
Original message:
Noticed the other issues claiming the same but without a clear answer still.. App does connect to my mongodb, i can see it in the connections list, however.. schema's arent generated even though the app has permission. Adding the game_loop schema manually also not solves the problem
The text was updated successfully, but these errors were encountered: