e-Learning-by-SSE / nm-self-learning

https://staging.sse.uni-hildesheim.de/selflearn
4 stars 4 forks source link

Tests: relative URL without a base #224

Open spark-sse opened 4 weeks ago

spark-sse commented 4 weeks ago

During testing, the follwing error occurs

  ERROR  failed to read input source map: failed to parse inline source map url
foreign-content.js.map

Caused by:
    relative URL without a base
    at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.282.3/src/lib.rs:407

The pipeline seems to be unaffected by this .

Furhtor obervation: This problems occured first, after switching to SWC for tests. It may has something to do with nx (https://github.com/nrwl/nx/issues/22146)

spark-sse commented 4 weeks ago

modifying productionBrowserSourceMaps does not change the behavior of this

spark-sse commented 1 week ago

updating to

        "@swc-node/register": "1.10.9",
        "@swc/cli": "0.5.0",
        "@swc/core": "1.9.2",
        "@swc/helpers": "0.5.15",
        "@swc/jest": "0.2.37",

the error now looks like this:

  ERROR  failed to read input source map: failed to find input source map file "library.js.map" in "/home/jenkins/workspace/Teaching_nm-self-learn_PR-226/node_modules/@prisma/client/runtime/library.js" file as either "/home/jenkins/workspace/Teaching_nm-self-learn_PR-226/node_modules/@prisma/client/runtime/library.js.map" or with appended .map
    at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-5.0.2/src/lib.rs:400

Disabling sourceMap in the swc/jest configuraiton (inside jest.preset.js) does not help, probably since swc tries to read source maps of modules in node_module. So modifying the setting for own source map generation, does not help here