Error including js file in html


#1

filename.html and filename.js are in same folder…I want to include the js file in the html but the ouput shows failed to load resource…don’t know why…help need…


#2

We are not mind readers. We cannot see what you have done. Please provide steps to reproduce and screenshots of what’s happening.


#3

Screenshot%20from%202018-02-12%2012-11-41

this is happening


#4

What do you see when you hover your mouse over login.js? Are you using a server to host this page?


#5

yes…I am using a server for hosting this page…and when I over mouse on it and click it…it’s blank


#6

Maybe I find a solution for it…but new problem occurs…Screenshot%20from%202018-02-12%2012-41-58Screenshot%20from%202018-02-12%2012-42-16


#7

Looks like it can’t find mongoose.

Snarky response aside, is there a reason you are not simply using require("mongoose")? I don’t know anything about what you are doing or what the mongoose module is, but the require function should be resolving the path itself.


#8

If you hover over a file name in a console message like that and don’t click it, it should tell you the URL where the browser thinks the file should be.