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

Support Node 18 & 20 #1457

Closed
davidkel opened this issue Oct 12, 2022 · 2 comments
Closed

Support Node 18 & 20 #1457

davidkel opened this issue Oct 12, 2022 · 2 comments
Labels
documentation Related to the documentation enhancement New feature or request

Comments

@davidkel
Copy link
Contributor

davidkel commented Oct 12, 2022

node 18 LTS is due on 25th October 2022, however the build fails with 2 issues

  1. Yo generator integration tests fail
${GENERATOR_METHOD} -- --workspace 'myWorkspace' --contractId 'mymarbles' --contractVersion 'v0' --contractFunction 'queryMarblesByOwner' --contractArguments '["Alice"]' --workers 'marbles' --benchmarkName 'A name for the marbles benchmark' --benchmarkDescription 'A description for the marbles benchmark' --label 'A label for the round' --rateController 'fixed-rate' --txType 'txDuration' --txDuration 'marbles'
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, scandir '/home/runner/work/caliper/caliper/node_modules/@hyperledger/generator-caliper/lib/generators'
    at Object.readdirSync (node:fs:1446:3)
    at exports.readdir (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at DirectoryReader.stream._read (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (node:internal/streams/readable:496:12)
    at readdirSync (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
    at ReaderSync.api (/opt/hostedtoolcache/node/18.10.0/x64/lib/node_modules/yo/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/home/runner/work/caliper/caliper/node_modules/@hyperledger/generator-caliper/lib/generators'
}

It's possible that previous versions of node report an error which Yo handles but a change means perhaps Yo misses this and throws an error now. May need to move to a newer version of Yo.

  1. fisco-bcos fails
Error: Error: C017C378007F0000:error:0A000127:SSL routines:tls_construct_ctos_supported_groups:no suitable groups:../deps/openssl/openssl/ssl/statem/extensions_clnt.c:246:No groups enabled for max supported SSL/TLS version

    at TLSSocket.<anonymous> (/home/runner/work/caliper/caliper/packages/caliper-fisco-bcos/lib/channelPromise.js:105:15)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Looks like node has changed the version of openssl again and causes problems with fisco-bcos. If we can't fix fisco-bcos then we should consider deprecating it saying that it won't work on node 18 and that it will be dropped from caliper in the next .x release and exclude it from the node 18 integration test

We will need documentation updates to confirm node 18 is supported and also the state of fisco-bcos

@davidkel davidkel added documentation Related to the documentation enhancement New feature or request labels Oct 12, 2022
@davidkel davidkel changed the title Update documentation to say that node 18 is supported Support Node 18 Oct 17, 2022
@davidkel
Copy link
Contributor Author

davidkel commented Mar 4, 2024

see #1517 for code changes, still need doc changes

  • replace all references to node 14, node 16 in the vNext docs and replace with node 18, node 20

@davidkel davidkel changed the title Support Node 18 Support Node 18 & 20 Apr 10, 2024
@davidkel
Copy link
Contributor Author

doc updates complete see #1551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to the documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant