tniessen/node-pqclean

Build for the web gives "spawn emcc ENOENT"

Catalan-1ap opened this issue · 3 comments

Following the instructions in the Readme, the following error appears. Trying on Windows, Ubuntu, lts and latest nodejs versions

Compiling 5 common source files, 274 KEM source files, 477 sign source files
node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error: spawn emcc ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn emcc',
  path: 'emcc',
  spawnargs: [
    '-std=c11',
    '-Ideps/PQClean/common',
    '-s',
    'ERROR_ON_UNDEFINED_SYMBOLS=0',
    '-s',
    'EXPORTED_FUNCTIONS=["_malloc","_free","_PQCLEAN_HQCRMRS128_CLEAN_crypto_kem_keypair","_PQCLEAN_HQCRMRS128_CLEAN_crypto_kem_enc","_PQCLEAN_HQCRMRS128_CLEAN_crypto_kem_dec","_PQCLEAN_HQCRMRS192_CLEAN_crypto_kem_keypair","_PQCLEAN_HQCRMRS192_CLEAN_crypto_kem_enc","_PQCLEAN_HQCRMRS192_CLEAN_crypto_kem_dec","_PQCLEAN_HQCRMRS256_CLEAN_crypto_kem_keypair","_PQCLEAN_HQCRMRS256_CLEAN_crypto_kem_enc","_PQCLEAN_HQCRMRS256_CLEAN_crypto_kem_dec","_PQCLEAN_KYBER1024_CLEAN_crypto_kem_keypair","_PQCLEAN_KYBER1024_CLEAN_crypto_kem_enc","_PQCLEAN_KYBER1024_CLEAN_crypto_kem_dec","_PQCLEAN_KYBER102490S_CLEAN_crypto_kem_keypair","_PQCLEAN_KYBER102490S_CLEAN_crypto_kem_enc","_PQCLEAN_KYBER102490S_CLEAN_crypto_kem_dec","_PQCLEAN_KYBER512_CLEAN_crypto_kem_keypair","_PQCLEAN_KYBER512_CLEAN_crypto_kem_enc","_PQCLEAN_KYBER512_CLEAN_crypto_kem_dec","_PQCLEAN_KYBER51290S_CLEAN_crypto_kem_keypair","_PQCLEAN_KYBER51290S_CLEAN_crypto_kem_enc","_PQCLEAN_KYBER51290S_CLEAN_crypto_kem_dec","_PQCLEAN_KYBER768_CLEAN_crypto_kem_keypair","_PQCLEAN_KYBER768_CLEAN_crypto_kem_enc","_PQCLEAN_KYBER768_CLEAN_crypto_kem_dec","_PQCLEAN_KYBER76890S_CLEAN_crypto_kem_keypair","_PQCLEAN_KYBER76890S_CLEAN_crypto_kem_enc","_PQCLEAN_KYBER76890S_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE348864_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE348864_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE348864_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE348864F_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE348864F_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE348864F_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE460896_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE460896_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE460896_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE460896F_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE460896F_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE460896F_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE6688128_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE6688128_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE6688128_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE6688128F_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE6688128F_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE6688128F_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE6960119_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE6960119_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE6960119_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE6960119F_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE6960119F_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE6960119F_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE8192128_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE8192128_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE8192128_CLEAN_crypto_kem_dec","_PQCLEAN_MCELIECE8192128F_CLEAN_crypto_kem_keypair","_PQCLEAN_MCELIECE8192128F_CLEAN_crypto_kem_enc","_PQCLEAN_MCELIECE8192128F_CLEAN_crypto_kem_dec","_PQCLEAN_DILITHIUM2_CLEAN_crypto_sign_keypair","_PQCLEAN_DILITHIUM2_CLEAN_crypto_sign_signature","_PQCLEAN_DILITHIUM2_CLEAN_crypto_sign_verify","_PQCLEAN_DILITHIUM2AES_CLEAN_crypto_sign_keypair","_PQCLEAN_DILITHIUM2AES_CLEAN_crypto_sign_signature","_PQCLEAN_DILITHIUM2AES_CLEAN_crypto_sign_verify","_PQCLEAN_DILITHIUM3_CLEAN_crypto_sign_keypair","_PQCLEAN_DILITHIUM3_CLEAN_crypto_sign_signature","_PQCLEAN_DILITHIUM3_CLEAN_crypto_sign_verify","_PQCLEAN_DILITHIUM3AES_CLEAN_crypto_sign_keypair","_PQCLEAN_DILITHIUM3AES_CLEAN_crypto_sign_signature","_PQCLEAN_DILITHIUM3AES_CLEAN_crypto_sign_verify","_PQCLEAN_DILITHIUM5_CLEAN_crypto_sign_keypair","_PQCLEAN_DILITHIUM5_CLEAN_crypto_sign_signature","_PQCLEAN_DILITHIUM5_CLEAN_crypto_sign_verify","_PQCLEAN_DILITHIUM5AES_CLEAN_crypto_sign_keypair","_PQCLEAN_DILITHIUM5AES_CLEAN_crypto_sign_signature","_PQCLEAN_DILITHIUM5AES_CLEAN_crypto_sign_verify","_PQCLEAN_FALCON1024_CLEAN_crypto_sign_keypair","_PQCLEAN_FALCON1024_CLEAN_crypto_sign_signature","_PQCLEAN_FALCON1024_CLEAN_crypto_sign_verify","_PQCLEAN_FALCON512_CLEAN_crypto_sign_keypair","_PQCLEAN_FALCON512_CLEAN_crypto_sign_signature","_PQCLEAN_FALCON512_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA128FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA128FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA128FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA128FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA128FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA128FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA128SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA128SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA128SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA128SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA128SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA128SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA192FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA192FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA192FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA192FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA192FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA192FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA192SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA192SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA192SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA192SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA192SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA192SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA256FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA256FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA256FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA256FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA256FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA256FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA256SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA256SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA256SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSHARAKA256SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSHARAKA256SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSHARAKA256SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2128FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2128FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2128FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2128FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2128FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2128FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2128SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2128SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2128SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2128SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2128SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2128SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2192FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2192FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2192FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2192FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2192FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2192FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2192SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2192SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2192SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2192SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2192SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2192SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2256FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2256FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2256FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2256FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2256FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2256FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2256SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2256SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2256SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHA2256SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHA2256SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHA2256SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE128FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE128FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE128FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE128FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE128FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE128FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE128SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE128SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE128SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE128SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE128SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE128SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE192FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE192FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE192FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE192FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE192FSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE192FSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE192SROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE192SROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE192SROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE192SSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE192SSIMPLE_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE192SSIMPLE_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE256FROBUST_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE256FROBUST_CLEAN_crypto_sign_signature","_PQCLEAN_SPHINCSSHAKE256FROBUST_CLEAN_crypto_sign_verify","_PQCLEAN_SPHINCSSHAKE256FSIMPLE_CLEAN_crypto_sign_keypair","_PQCLEAN_SPHINCSSHAKE256FSIMPLE_CLEAN_crypto_sign_signature","_PQCL'... 415 more characters,
    '-s',
    'WASM=1',
    '-Wl,--no-entry',
    '-flto',
    '-Os',
    '-Wall',
    '-Wextra',
    '-Wno-unused-function',
    '-fvisibility=default',
    '-o',
    'wasm/gen/pqclean.wasm',
    'deps/PQClean/common/aes.c',
    'deps/PQClean/common/fips202.c',
    'deps/PQClean/common/nistseedexpander.c',
    'deps/PQClean/common/sha2.c',
    'deps/PQClean/common/sp800-185.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/code.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/fft.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/gf.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/gf2x.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/hqc.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/kem.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/parsing.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/reed_muller.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/reed_solomon.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-128/clean/vector.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/code.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/fft.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/gf.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/gf2x.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/hqc.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/kem.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/parsing.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/reed_muller.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/reed_solomon.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-192/clean/vector.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/code.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/fft.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/gf.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/gf2x.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/hqc.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/kem.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/parsing.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/reed_muller.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/reed_solomon.c',
    'deps/PQClean/crypto_kem/hqc-rmrs-256/clean/vector.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/cbd.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/indcpa.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/kem.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/ntt.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/poly.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/polyvec.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/reduce.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/symmetric-shake.c',
    'deps/PQClean/crypto_kem/kyber1024/clean/verify.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/cbd.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/indcpa.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/kem.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/ntt.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/poly.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/polyvec.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/reduce.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/symmetric-aes.c',
    'deps/PQClean/crypto_kem/kyber1024-90s/clean/verify.c',
    'deps/PQClean/crypto_kem/kyber512/clean/cbd.c',
    'deps/PQClean/crypto_kem/kyber512/clean/indcpa.c',
    'deps/PQClean/crypto_kem/kyber512/clean/kem.c',
    'deps/PQClean/crypto_kem/kyber512/clean/ntt.c',
    'deps/PQClean/crypto_kem/kyber512/clean/poly.c',
    'deps/PQClean/crypto_kem/kyber512/clean/polyvec.c',
    'deps/PQClean/crypto_kem/kyber512/clean/reduce.c',
    'deps/PQClean/crypto_kem/kyber512/clean/symmetric-shake.c',
    'deps/PQClean/crypto_kem/kyber512/clean/verify.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/cbd.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/indcpa.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/kem.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/ntt.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/poly.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/polyvec.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/reduce.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/symmetric-aes.c',
    'deps/PQClean/crypto_kem/kyber512-90s/clean/verify.c',
    'deps/PQClean/crypto_kem/kyber768/clean/cbd.c',
    'deps/PQClean/crypto_kem/kyber768/clean/indcpa.c',
    'deps/PQClean/crypto_kem/kyber768/clean/kem.c',
    'deps/PQClean/crypto_kem/kyber768/clean/ntt.c',
    'deps/PQClean/crypto_kem/kyber768/clean/poly.c',
    'deps/PQClean/crypto_kem/kyber768/clean/polyvec.c',
    'deps/PQClean/crypto_kem/kyber768/clean/reduce.c',
    'deps/PQClean/crypto_kem/kyber768/clean/symmetric-shake.c',
    'deps/PQClean/crypto_kem/kyber768/clean/verify.c',
    'deps/PQClean/crypto_kem/kyber768-90s/clean/cbd.c',
    'deps/PQClean/crypto_kem/kyber768-90s/clean/indcpa.c',
    'deps/PQClean/crypto_kem/kyber768-90s/clean/kem.c',
    ... 673 more items
  ]
}

Thank you for pointing this out @Catalan-1ap. The build-wasm script requires the Emscripten Compiler Frontend (emcc) to produce the WebAssembly output. For CI and for releases, we currently use a slightly older version of the Emscripten SDK:

build-wasm:
runs-on: ubuntu-latest
env:
NODE_VERSION: 18.x
EMSDK_VERSION: 3.1.21

If you want to build the WebAssembly file locally, I would recommend to use the same version of Emscripten (3.1.21).

Unfortunately, the Emscripten SDK will also populate your PATH with an old version of Node.js, which might cause other problems. As a temporary workaround, until we figure out a better solution, you can skip the build-wasm step and use pre-built binaries instead:

$ git clone --branch v0.3.1 https://github.com/tniessen/node-pqclean.git
$ mkdir -p wasm/gen
$ curl -o wasm/gen/algorithms.json "https://unpkg.com/pqclean@0.3.1/wasm/gen/algorithms.json"
$ curl -o wasm/gen/pqclean.wasm "https://unpkg.com/pqclean@0.3.1/wasm/gen/pqclean.wasm"
$ npm run build-web
$ npm run test-web chrome

The last step is optional and only necessary for testing.

We will try to find a better solution to this issue. I have previously considered publishing the web distribution to npm directly to make this easier.

@tniessen Thank you for your attention, pre-build binaries works
Should i close the issue?

Please keep it open as a reminder for me to either update the documentation or to find a better solution :)