[add] So my next problem is that when i try adding a new dependence (npm install --save socket.io). The JSON file is also valid. I get this error: Failed to parse json
I solve this by using path variable. The sample code will look like below.
var path = require("path"); app.get('/', (req, res) => { res.sendFile(path.join(__dirname + '/index.html')); })