Skip to content

Bump Node.js requirement from to >=12.2 to >=12.6 #8839

Closed

Description

@Jolg42

It looks like the current Node-API requirement for Node.js is >=12.6 based on #7621

We should bump, especially since Node-API will be the default.

And let's update the docs as well.

Activity

  1. added this to the 2.31.0 / 3.0.x milestone on Aug 20, 2021
  2. added
    topic: node-api
    kind/tech
    tech/typescript
    on Aug 20, 2021
  3. janpio commented on Aug 24, 2021

    @janpio
    Contributor

    We should see if Node-API makes our tests fail in any way before merging the requirement change.
    In theory e2e tests should cover this - and if not we should add tests for that. https://github.com/prisma/e2e-tests/blob/422b057cfaa948f4e39d6308ae25765cdee57f34/.github/workflows/test.yaml#L281

  4. janpio commented on Aug 26, 2021

    @janpio
    Contributor

    Node 12.2 tests seem to pass fine with binary and library after the default change:
    https://github.com/prisma/e2e-tests/runs/3432494666
    https://github.com/prisma/e2e-tests/runs/3432494707

    Seems we have to look into #7621 and prisma/ecosystem-tests#1750 again and possibly write an explicit test that justifies this requirement change (by failing with current node, but succeeding with 12.6).

  5. williamluke4 commented on Aug 27, 2021

    @williamluke4

    Hmm just had a look at the 12.2 e2e test with node-api the test passes for some weird reason despite it actually failing... see here

  6. Jolg42 commented on Aug 27, 2021

    @Jolg42
    ContributorAuthor

    It actually makes sense that tests are passing since it's only a warning UnhandledPromiseRejectionWarning

    It can be changed like this

    --unhandled-rejections=mode
    

    Since v15: Changed default mode to throw. Previously, a warning was emitted.
    see: https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode

  7. Jolg42 commented on Aug 27, 2021

    @Jolg42
    ContributorAuthor

    Actually it's now failing since 2.31.0-dev.13 with https://github.com/prisma/e2e-tests/runs/3440731303?check_suite_focus=true#step:6:356

    ✔ Generated Prisma Client (2.31.0-dev.13) to ./node_modules/@prisma/client in 56ms
    You can now start using Prisma Client in your code. Reference: pris.ly/d/client
    ```
    import { PrismaClient } from '@prisma/client'
    const prisma = new PrismaClient()
    ```
    2021-08-27T07:20:06.012Z prisma:getConfig Using Node-API Query Engine at: /home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node
    Done in 2.40s.
    -----------------------------
    
    run.sh was successful (code 0), running generic/basic/test.sh...
    
    yarn run v1.22.11
    warning ../../package.json: No license field
    $ ts-node ./script.ts
    PrismaClientKnownRequestError3 [PrismaClientKnownRequestError]: 
    Invalid `prisma.user.deleteMany()` invocation:
    
    
      
        at cb (/home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/client/runtime/index.js:36068:17) {
      code: 'InvalidArg',
      clientVersion: '2.31.0-dev.13',
      meta: undefined
    }
    error Command failed with exit code 1.
    

    The 3 in PrismaClientKnownRequestError3 is 🤔

  8. Jolg42 commented on Aug 27, 2021

    @Jolg42
    ContributorAuthor
  9. janpio commented on Aug 27, 2021

    @janpio
    Contributor

    The 3 in PrismaClientKnownRequestError3 is 🤔

    Known problem with issue at #7035

  10. janpio commented on Aug 27, 2021

    @janpio
    Contributor

    Actually it's now failing since 2.31.0-dev.13 with prisma/e2e-tests/runs/3440731303?check_suite_focus=true#step:6:356

    What made it fail now?

    PrismaClientKnownRequestError3 [PrismaClientKnownRequestError]:
    Invalid prisma.user.deleteMany() invocation:

    at cb (/home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/client/runtime/index.js:36068:17) {
    

    code: 'InvalidArg',
    clientVersion: '2.31.0-dev.13',
    meta: undefined
    }
    error Command failed with exit code 1.

    Wth does this error message mean?
    Is this really the same problem as what was tracked in the two bug issues re the unhandled promise rejection?

  11. Jolg42 commented on Aug 27, 2021

    @Jolg42
    ContributorAuthor

    Only relevant bit of information from error message is code: 'InvalidArg', not sure what that means here.

  12. williamluke4 commented on Aug 27, 2021

    @williamluke4

    The reason this is failing now is because #8867 was merged. This was my original explanation on the code: 'InvalidArg', #7621 (comment)

  13. Jolg42 commented on Aug 27, 2021

    @Jolg42
    ContributorAuthor

    So we need to bump then from what I read.

  14. janpio commented on Aug 27, 2021

    @janpio
    Contributor

    Bump here, then merge prisma/ecosystem-tests#2023 to (test and then) reflect the new requirement.

  15. janpio commented on Aug 31, 2021

    @janpio
    Contributor

    PR at #9049

  16. assigned and unassigned on Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/techtech/typescripttopic: node versiontopic: node-api

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions