emscripten-core / emscripten-core/emscripten

emcc hello.c -o hello.js error in nodejs v18.20.2

Aperta
#21,901 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
27.6k
Fork
3.6k
Merge medio
1g 14h
PR unite (30g)
125

Descrizione

```
Node: v18.20.2
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5 ()
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

```
node test2.js
/home/runner/test2.js:146
throw ex;
^

TypeError: Failed to parse URL from /home/runner/test2.wasm
at node:internal/deps/undici/undici:12618:11 {
[cause]: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:405:5)
at new URL (node:internal/url:676:13)
at new Request (node:internal/deps/undici/undici:6108:25)
at fetch (node:internal/deps/undici/undici:10396:25)
at Object.fetch (node:internal/deps/undici/undici:12617:10)
at fetch (node:internal/process/pre_execution:281:25)
at instantiateAsync (/home/runner/test2.js:1710:14)
at createWasm (/home/runner/test2.js:1746:3)
at Object. (/home/runner/test2.js:1949:11)
at Module._compile (node:internal/modules/cjs/loader:1364:14) {
input: '/home/runner/test2.wasm',
code: 'ERR_INVALID_URL'
}
}

```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riprodurre il comando `emcc hello.c -o hello.js` con Node v18.20.2 e ispezionare il `test2.js` generato nei punti di ingresso `instantiateAsync` e `createWasm` mostrati nel traceback. Determinare perché il caricamento di `test2.wasm` produce `ERR_INVALID_URL`; il lavoro è completato quando l’output generato viene eseguito con Node senza questo errore, con un test di regressione se il repository ne fornisce uno.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c, node.js, wasm
Ambito
compilers
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.