Based on another thread from here on StackExchange, I tried using a code (package: file-system node.js) but it doesn't work. Where have I made a mistake?
<html>
<script>
window.onload = function() {
var fs = require('fs');
var files = fs.readdirSync('/Personal/Week4');
var output = document.getElementById("field");
output.innerHTML = files;
</script>
<body>
<div id="field">
<p>asd</p>
</div>
</body>
</html>