'node js Uncaught Error: error with HTTP module
i am new to nodejs and this probleme made a headeach for me This is my code below:
import http from 'http';
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Hello World!');
res.end();
}).listen(8080);
The Error is:
Uncaught TypeError: Error resolving 'http' module specifier. Relative module specifiers must start with "./", "../" or "/"
I searched in blogs and youtube and I couldn't find the answer(Note: just three days ago this code worked perfectly but now it shows me this error).
Hope someone can help me to fix this Error.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
