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

Add support for Node.js 18 (Active LTS version) #623

Closed
MikeMcC399 opened this issue Nov 6, 2022 · 2 comments
Closed

Add support for Node.js 18 (Active LTS version) #623

MikeMcC399 opened this issue Nov 6, 2022 · 2 comments

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Nov 6, 2022

The workflow currently tests with Node.js 12, 14 & 16:

node: [12, 14, 16]

Node.js Release Schedule shows:

  • Node.js 18 entering Active LTS status on October 25, 2022
  • Node.js 12 entering End-of-Life on April 30, 2022

so Node.js 18 should be added and probably Node.js 12 could be removed.


npm run build on v4.2.0 v4.2.1 is unsuccessful on Windows 11 (see log below) with Node.js v18.12.1 and on Ubuntu 22.04.1 LTS:

$ npm run build

> @cypress/github-action@0.0.0-development build
> ncc build -o dist index.js

ncc: Version 0.33.1
ncc: Compiling file index.js into CJS
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at hashOf (D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:37:1890023)
    at ncc (D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:37:1894690)
    at runCmd (D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:52268)
    at 819 (D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:48838)
    at __webpack_require__ (D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:59076)
    at D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:59288
    at D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:59349
    at Object.<anonymous> (D:\github2\cypress-io\github-action\node_modules\@vercel\ncc\dist\ncc\cli.js:8:28) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Currently the ncc version is specified as follows:

"@vercel/ncc": "0.33.1",

Bumping ncc to 0.33.2 resolves this error.
https://github.com/vercel/ncc/releases/tag/0.33.2

@MikeMcC399
Copy link
Collaborator Author

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Dec 1, 2022

The issue affecting building github-action under Node.js 18 is resolved:

$ node -v
v18.12.1

$ npm run build

> @cypress/github-action@0.0.0-development build
> ncc build -o dist index.js

ncc: Version 0.34.0
ncc: Compiling file index.js into CJS
   1kB  dist\thread.js
2937kB  dist\index.js
2938kB  [1375ms] - ncc 0.34.0

Thanks to @jaffrepaul !

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