Closed Yongbeom-Kim closed 1 year ago
@Yongbeom-Kim i wasn't able to reproduce this on my system (macos ventura 13.0, m1 chip) with node@18.13.0.
there was no timeout or errors on my end when running the test script:
repl works fine as well:
also i realised that
esbuild
was used in the test script instead oftsc
for compilation. but i don't think it matters tho
let me know which commit you were testing it on so i can test it again
I've been testing on the latest commit!
I've tried it on Ubuntu WSL (22.04 LTS) and it works, just not on Windows 11. So maybe a unix-dependent thing.
I see that this is a platform-dependent thing, but I'm happy enough that it works... I guess? I see that this is probably an upstream issue with the xmlhttprequest-ts
, and so will be closing this issue. I think it should still be replaced with a more modern (say, fetch
API), so I'll move this on to a proposal instead
Problem
Is as title says - I can't fetch module data from https://source-academy.github.io/modules/modules.json from
js-slang
(times out).stdout:
xmlhttprequest-ts
library, and a test script withaxios
for a get request on the same website runs fineVersions:
Steps to reproduce
js-slang
node dist/repl/repl.js --chapter=4 "import {entry} from 'binary_tree';"
Expected output:
Unable to get modules
after timeouttest script
npm run build
node ./dist/index.js
Output:
Suggestion:
xmlhttprequest
withaxios
(orfetch
API)Benefits
Limitations