sclorg / s2i-nodejs-container

NodeJS images based on Red Hat Software Collections and intended for OpenShift and general usage, that provide a platform for building and running NodeJS applications. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
http://softwarecollections.org
Apache License 2.0
164 stars 286 forks source link

Express and cloudevents failing with nodejs 20 #404

Open hhorak opened 9 months ago

hhorak commented 9 months ago

express failing:

  350 passing (934ms)
  1 failing

  1) express.json()
       with strict option
         when undefined
           should 400 on primitives:
     Error: expected `[entity.parse.failed] Unexpected token 't', "#rue" is not valid JSON` response body, got `[entity.parse.failed] Unexpected token 't', "#" is not valid JSON`
      at Context.<anonymous> (test/express.json.js:265:12)
      at process.processImmediate (node:internal/timers:478:21)
  ----
      at error (node_modules/supertest/lib/test.js:335:15)
      at Test._assertBody (node_modules/supertest/lib/test.js:206:16)
      at /opt/app-root/src/node_modules/supertest/lib/test.js:308:13
      at Test._assertFunction (node_modules/supertest/lib/test.js:285:13)
      at Test.assert (node_modules/supertest/lib/test.js:164:23)
      at Server.localAssert (node_modules/supertest/lib/test.js:120:14)
      at Object.onceWrapper (node:events:626:28)
      at Server.emit (node:events:512:28)
      at emitCloseNT (node:net:2262:8)
      at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

cloudevents failing:

> cloudevents@6.0.4 conformance
> cucumber-js ./conformance/features/*-protocol-binding.feature -p default

This Node.js version (v20.4.0) has not been tested with this version of Cucumber; it should work normally, but please raise an issue if you see anything unexpected.
TSError: ⨯ Unable to compile TypeScript:
src/event/spec.ts(10,22): error TS2307: Cannot find module '../schema/v1' or its corresponding type declarations.

    at createTSError (/opt/app-root/src/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/opt/app-root/src/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/opt/app-root/src/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/opt/app-root/src/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/opt/app-root/src/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Object.require.extensions.<computed> [as .ts] (/opt/app-root/src/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
hhorak commented 9 months ago

Smaller reproducer for express:

$ cat Containerfile.express 
FROM quay.io/fedora/s2i-core:37

RUN yum -y install git nodejs20 nodejs20-npm && yum clean all

RUN git clone --branch 4.18.2 https://github.com/expressjs/express.git testpkg
RUN ln -s /usr/bin/npm-20 /usr/bin/npm
RUN ln -s /usr/bin/node-20 /usr/bin/node
RUN cd testpkg && npm install express@4.18.2
RUN cd testpkg && npm test

$ podman build -f Containerfile.express
hhorak commented 9 months ago

Hm, the cloudevents seems to fail only occasionally, I've seen many passes.. so maybe not a real issue.