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

yarn start gives "digital envelope routines::unsupported" error #1297

Open
andybak opened this issue Jun 8, 2024 · 2 comments
Open

yarn start gives "digital envelope routines::unsupported" error #1297

andybak opened this issue Jun 8, 2024 · 2 comments

Comments

@andybak
Copy link

andybak commented Jun 8, 2024

Describe the bug
Clean checkout on Windows. yarn install is fine. yarn build says:

node:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
Error: error:0308010C:digital envelope routines::unsupported

To Reproduce
Steps to reproduce the behavior:

  1. git clone
  2. yarn install
  3. yarn start
  4. See error

Expected behavior
No error ;-)

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser n/a
  • Version n/a
  • node v20.9.0
  • yarn 1.22.22

Additional context
yarn was a fresh install as well: npm install --global yarn

@andybak
Copy link
Author

andybak commented Jun 8, 2024

Full trace:

PS C:\Users\andyb\Documents\Spoke> yarn start                        
yarn run v1.22.22
$ cross-env NODE_ENV=development webpack-dev-server --mode development
i 「wds」: Project is running at https://hubs.local:9090/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\Users\andyb\Documents\Spoke
i 「wds」: 404s will fallback to /index.html
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 (C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:412:16)
    at handleParseError (C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:463:10)
    at C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:495:5
    at C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:354:12
    at C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\andyb\Documents\Spoke\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:43:16)
    at C:\Users\andyb\Documents\Spoke\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:79:9
node:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

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 (C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:412:16)
    at handleParseError (C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:463:10)
    at C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:495:5
    at C:\Users\andyb\Documents\Spoke\node_modules\webpack\lib\NormalModule.js:354:12
    at C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (C:\Users\andyb\Documents\Spoke\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\andyb\Documents\Spoke\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:43:16)
    at C:\Users\andyb\Documents\Spoke\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:79:9
    at C:\Users\andyb\Documents\Spoke\node_modules\graceful-fs\graceful-fs.js:90:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.9.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@andybak
Copy link
Author

andybak commented Jun 8, 2024

Workaround. In package.json change the "start" command to:

"start": "set NODE_OPTIONS=--openssl-legacy-provider && cross-env NODE_ENV=development webpack-dev-server --mode development",

i.e. prefix the existing command with "set NODE_OPTIONS=--openssl-legacy-provider && "

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