Nodejs Debugging Report Error “ReferenceError: Required Is Not Defined”, Why?

  node.js, question
function onRequest(request, response, modules) {
 var a = require('http');
 a.createServer(function (req, res) {
 req.setEncoding('utf8');
 var postData = "";
 req.addListener("data", function (chunk) {
 Postdataplus = chunk;
 });
 req.addListener("end", function () {
 var resp = function (ret, status_code) {
 res.writeHead(status_code, {
 "Content-Type": "text/plain;  charset=utf-8"
 });
 res.end(ret);
 bracket
 
 });
 }).listen(8080, "0.0.0.0");
 bracket

require()YesnodejsIf it is in thenodejsThere is no such problem when running under the environmenthttps://nodejs.org/dist/latest-v5.x/docs/api/http.html