mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(core): Add a WebCrypto Polyfill for older versions of Node.js 18 (#9894)
This commit is contained in:
parent
dc1c5fce8a
commit
59c8bf1c44
|
@ -55,6 +55,11 @@ if (process.env.NODEJS_PREFER_IPV4 === 'true') {
|
|||
// More details: https://github.com/nodejs/node/issues/48145
|
||||
require('net').setDefaultAutoSelectFamily?.(false);
|
||||
|
||||
// WebCrypto Polyfill for older versions of Node.js 18
|
||||
if (!globalThis.crypto?.getRandomValues) {
|
||||
globalThis.crypto = require('node:crypto').webcrypto;
|
||||
}
|
||||
|
||||
(async () => {
|
||||
const oclif = await import('@oclif/core');
|
||||
await oclif.execute({ dir: __dirname });
|
||||
|
|
Loading…
Reference in a new issue