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

ServicePulse build breaks when using Node.js >= 17 #1324

Closed
timbussmann opened this issue Nov 25, 2022 · 1 comment
Closed

ServicePulse build breaks when using Node.js >= 17 #1324

timbussmann opened this issue Nov 25, 2022 · 1 comment
Labels
Type: Improvement Type: Improvement Type: Tech Debt Type: Tech Debt
Milestone

Comments

@timbussmann
Copy link
Contributor

When newer versions of Node.js (> 16), the ServicePulse JS build/bundling processes (e.g. npm run load) fails with the following error:

D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:133
		if(isError) throw e;
		            ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\webpack\lib\NormalModule.js:[47](https://github.com/Particular/ServicePulse/actions/runs/3546591782/jobs/5955795114#step:6:48)1:10)
    at D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\webpack\lib\NormalModule.js:[50](https://github.com/Particular/ServicePulse/actions/runs/3546591782/jobs/5955795114#step:6:51)3:5
    at D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\webpack\lib\NormalModule.js:358:12
    at D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at context.callback (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at module.exports (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\babel-loader\lib\index.js:182:8)
    at LOADER_EXECUTION (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:119:14)
    at runSyncOrAsync (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:120:4)
    at iterateNormalLoaders (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:[55](https://github.com/Particular/ServicePulse/actions/runs/3546591782/jobs/5955795114#step:6:56):16)
    at D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at D:\a\ServicePulse\ServicePulse\src\ServicePulse.Host\node_modules\graceful-fs\graceful-fs.js:115:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:[68](https://github.com/Particular/ServicePulse/actions/runs/3546591782/jobs/5955795114#step:6:69):3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

This can be reproduced by adding the following action to the ci.yml before the build steps:

- uses: actions/setup-node@v3
  with:
    node-version: 18      

There is a workaround described in this webpack issue which is to set a specific environment variable:

export NODE_OPTIONS=--openssl-legacy-provider

(or $env:NODE_OPTIONS = "--openssl-legacy-provider" on PowerShell)

@timbussmann timbussmann added the Type: Tech Debt Type: Tech Debt label Nov 25, 2022
@TravisNickels
Copy link
Member

@TravisNickels TravisNickels added this to the 1.38.2 milestone Mar 20, 2024
@TravisNickels TravisNickels added the Type: Improvement Type: Improvement label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Type: Improvement Type: Tech Debt Type: Tech Debt
Projects
None yet
Development

No branches or pull requests

2 participants