Ok so I was doing some more research over the past few weeks and I realized I was coming about this all wrong. Require is a feature specific to node.js, and because chrome does not just automatically have node.js, it does not work. What I was attempting to do was read a JSON file and output it into some HTML so I can view it there. The solution I found is to get express.js and make an API. So something like
`
app.get("/api/database", (req, res) => {
res.sendFile(__dirname + '/DB.json')
})
`
And on the HTML side you can add `
fetch('/api/database')
.then(response => response.json())
.then(data => {
console.log(data.Input1)
document.querySelector("#debug").innerText = data.Input1
})
`
With
<div id="debug"></div>
Right above the script tags.
Thanks to everyone who helped. The video I took the html side of the code can be found here.