Skip to content

Commit

Permalink
docs: update to node 20, re-upgrade got to 14.0.0, update other deps (#…
Browse files Browse the repository at this point in the history
…79)

We had to revert #75 because got
14.0.0 requires node 20.
This PR updates to node 20 for the docs github workflow.
It also re-upgrade got to 14.0.0.

This caused another issue when building the docs:

```
tip Apply plugin mermaidjs (i.e. "vuepress-plugin-mermaidjs") ...
[info] [webpackbar] Compiling Client
[info] [webpackbar] Compiling Server
/home/runner/work/cff/cff/docs/node_modules/loader-runner/lib/LoaderRunner.js:114
			throw e;
			^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/home/runner/work/cff/cff/docs/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/runner/work/cff/cff/docs/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/runner/work/cff/cff/docs/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/runner/work/cff/cff/docs/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/runner/work/cff/cff/docs/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/runner/work/cff/cff/docs/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/runner/work/cff/cff/docs/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/runner/work/cff/cff/docs/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/runner/work/cff/cff/docs/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/home/runner/work/cff/cff/docs/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/runner/work/cff/cff/docs/node_modules/cache-loader/dist/index.js:134:7
    at /home/runner/work/cff/cff/docs/node_modules/graceful-fs/graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:189:23) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
```

This is apparently a known issue with Node 17.0.0+, which upgrades Node
to OpenSSL 3.0. This new version disallows certain legacy operations
found to be vulnerable to security attacks.
*
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V17.md#17.0.0
* vuejs/vuepress#3136

We can workaround this issue by setting
`NODE_OPTIONS=--openssl-legacy-provider`
when building the docs, which this PR also does.
This is not an ideal solution as using the older OpenSSL version.

The issue is resolved by upgrading the other dependencies in our
yarn.lock.

---------

Co-authored-by: Abhinav Gupta <[email protected]>
  • Loading branch information
JacobOaks and abhinav authored Jan 6, 2024
1 parent b1be0ce commit 525303a
Show file tree
Hide file tree
Showing 3 changed files with 1,417 additions and 1,307 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: 'yarn'
cache-dependency-path: docs/yarn.lock

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"dependencies": {
"cacheable-request": "10.2.14",
"got": "13.0.0"
"got": "14.0.0"
}
}
Loading

0 comments on commit 525303a

Please sign in to comment.