holzschu / holzschu/a-shell

Jsc: can't find http

Open
#637 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
3.9k
Forks
213
Avg merge
1m
Merged PRs (30d)
1

Description

Now I'm learning `node.js` to understand `jsc` better. I'm using the following code:
```JavaScript
const module=require("http");
module.createServer(function(request, response){
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello, world!');
}).listen(8888);
console.log('Server running at http://127.0.0.1:8888/')

```
But it can't run:
```
jsc: Error in file require.js at line 209, column 52: Error: Could not find module http
```
I wonder how to install modules now.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the JavaScript example in jsc and inspect require.js around line 209, where the missing http module is reported. Determine whether the issue concerns module resolution or supported Node.js modules, then verify the documented or implemented module-loading behavior with the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.