Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express and cloudevents failing with nodejs 20 #404

Open
hhorak opened this issue Aug 22, 2023 · 2 comments
Open

Express and cloudevents failing with nodejs 20 #404

hhorak opened this issue Aug 22, 2023 · 2 comments

Comments

@hhorak
Copy link
Member

hhorak commented Aug 22, 2023

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:

> [email protected] 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 hhorak mentioned this issue Aug 22, 2023
@hhorak
Copy link
Member Author

hhorak commented Aug 22, 2023

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 [email protected]
RUN cd testpkg && npm test

$ podman build -f Containerfile.express

@hhorak
Copy link
Member Author

hhorak commented Aug 22, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant