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

error:03000086:digital envelope routines::initialization error #2

Closed
snowdream opened this issue Aug 20, 2023 · 1 comment
Closed

Comments

@snowdream
Copy link

Bug report(问题描述)

Steps to reproduce(问题复现步骤)

$ pnpm dev

> vue-element-admin@4.4.0 dev D:\workspace\go\src\****\vue-element-admin
> vue-cli-service serve

 INFO  Starting development server...
10% building 2/3 modules 1 active ...ode_modules\eslint-loader\index.js??ref--13-0!D:\workspace\go\src\****\vue-element-admin\src\main.js E
rror: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:140:10)
    at module.exports (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:471:10)
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:503:5        
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:358:12       
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\enhanced-resolve@4.5.0\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\enhanced-resolve@4.5.0\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
10% building 2/5 modules 3 active ...3_webpack@4.46.0\node_modules\webpack-dev-server\client\index.js?http://192.168.1.6:9527&sockPath=/sockjs-node n
ode:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:140:10)
    at module.exports (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:471:10)
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:503:5        
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:358:12       
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\enhanced-resolve@4.5.0\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\enhanced-resolve@4.5.0\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at D:\workspace\go\src\****\vue-element-admin\node_modules\.pnpm\graceful-fs@4.2.11\node_modules\graceful-fs\graceful-fs.js:123:16    
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v19.8.1
 ELIFECYCLE  Command failed with exit code 1.
@snowdream
Copy link
Author

PanJiaChen#2

closed #2

snowdream added a commit that referenced this issue Aug 20, 2023
https://stackoverflow.com/a/69699772

You can try one of these:

1. Downgrade to Node.js v16.

You can reinstall the current LTS version from Node.js’ [website](https://nodejs.org/en/download/releases/).

You can also use [nvm](https://github.com/nvm-sh/nvm). For Windows, use [nvm-windows](https://github.com/coreybutler/nvm-windows).

2. Enable legacy OpenSSL provider.

On Unix-like (Linux, macOS, Git bash, etc.):
```
export NODE_OPTIONS=--openssl-legacy-provider
```
On Windows command prompt:
```
set NODE_OPTIONS=--openssl-legacy-provider
```
On PowerShell:
```
$env: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