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

npm run dev失败 #768

Open
yyljwyy opened this issue Aug 31, 2023 · 1 comment
Open

npm run dev失败 #768

yyljwyy opened this issue Aug 31, 2023 · 1 comment

Comments

@yyljwyy
Copy link

yyljwyy commented Aug 31, 2023

执行后显示以下问题:

[email protected] dev
vue-cli-service serve

INFO Starting development server...
10% building 2/5 modules 3 active ...lint-loader\index.js??ref--13-0!E:\CodeRepos\vue-admin-template-master\src\main.jsError: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at module.exports (E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:471:10)
at E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:503:5
at E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:358:12
at E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at runSyncOrAsync (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
at iterateNormalLoaders (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array. (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (E:\CodeRepos\vue-admin-template-master\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at E:\CodeRepos\vue-admin-template-master\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at E:\CodeRepos\vue-admin-template-master\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
node:internal/crypto/hash:69
this[kHandle] = new _Hash(algorithm, xofLen);
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at module.exports (E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:471:10)
at E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:503:5
at E:\CodeRepos\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:358:12
at E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array. (E:\CodeRepos\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (E:\CodeRepos\vue-admin-template-master\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at E:\CodeRepos\vue-admin-template-master\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at E:\CodeRepos\vue-admin-template-master\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 v18.17.1

@snowdream
Copy link

snowdreamtech#2

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.

You can also use nvm. For Windows, use nvm-windows.

  1. 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

2 participants