.env: line 1: syntax error near unexpected token `(’
5:07 PM
.env: line 1: `const mongoose = require(‘mongoose’);’
5:07 PM
internal/modules/cjs/loader.js:613
5:07 PM
throw err;
5:07 PM
^
5:07 PM
5:07 PM
Error: Cannot find module ‘./model/User’
5:07 PM
Require stack:
5:07 PM
Jump To- /app/router/user.js
5:07 PM
Jump To- /app/server.js
5:07 PM
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
5:07 PM
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
5:07 PM
at Module.require (internal/modules/cjs/loader.js:666:19)
5:07 PM
at require (internal/modules/cjs/helpers.js:16:16)
5:07 PM
Jump Toat Object. (/app/router/user.js:2:14)
I have check all this errors but cant help it please help. and i wont mind to invite you to the project to see those file if you drop your name at glitch thank you.
Glitch reads the .env file if I’m not mistaken and then uses the editor to edit the settings. Since it has .env in the error and says “line 1” and I see “mongoose” it looks wrong.
thanks, [Glitch] is the link to my project [project name: ‘pass-req-form’] feel free to edit suggest and comment more. I equally sent you invitation to view this files your self if it please you.
I took a look and it wasn’t your .env file so perhaps .env is something Glitch just outputs… on the other hand I couldn’t see it logging the message you referred to. I did see it fail consistently trying to access user.
Something happened as I was reading things and at the moment I can no longer get to the project. It looked as if someone told it to reload while I was reading and now nothing.
I will suggest that is best fixed by commenting anything not necessary to get it running and then gradually uncommenting each line to see which one breaks it.
I was trying to see if the require patch to user.js was correct when it went south.