I am super new to Node JS and I was able to run this js file before. Right now, I can't and I don't know why. It says that it doesn't see app.js file under the config folder but as you see there is app.js under the config and I also gave direction in server.js. Please help me out.
CodePudding user response:
if you are importing app.js file its a good idea to add .js at the end just like this
var app = require('../server/config/app.js')
CodePudding user response:
You are using ..
when your server.js file is at the same level as the server
directory. Use one .
and it should work
const app = require('./server/config/app');