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

启动报错ERR_OSSL_EVP_UNSUPPORTED #13

Open
reformc opened this issue Jan 28, 2023 · 2 comments
Open

启动报错ERR_OSSL_EVP_UNSUPPORTED #13

reformc opened this issue Jan 28, 2023 · 2 comments

Comments

@reformc
Copy link

reformc commented Jan 28, 2023

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 (/opt/node/AKStreamNVR/node_modules/webpack/lib/util/createHash.js:90:53)
at NormalModule._initBuildHash (/opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:401:16)
at handleParseError (/opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:449:10)
at /opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:481:5
at /opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:342:12
at /opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at runSyncOrAsync (/opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
at iterateNormalLoaders (/opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array. (/opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/opt/node/AKStreamNVR/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /opt/node/AKStreamNVR/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /opt/node/AKStreamNVR/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
/opt/node/AKStreamNVR/node_modules/react-scripts/scripts/start.js:19
throw err;
^

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 (/opt/node/AKStreamNVR/node_modules/webpack/lib/util/createHash.js:90:53)
at NormalModule._initBuildHash (/opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:401:16)
at /opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:433:10
at /opt/node/AKStreamNVR/node_modules/webpack/lib/NormalModule.js:308:13
at /opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/opt/node/AKStreamNVR/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /opt/node/AKStreamNVR/node_modules/babel-loader/lib/index.js:51:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

@fireicesion
Copy link

我也遇到了这个问题

@fireicesion
Copy link

找到解决办法了
错误原因:https://www.jianshu.com/p/198cc60910d0
解决办法:
修改package.json的scripts部分,添加加粗部分代码
"scripts": {
"dev": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/ && react-app-rewired start",
"start": "SET NODE_OPTIONS=--openssl-legacy-provider && react-app-rewired start",
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && react-app-rewired build && tar -cvzf zlmediakit_nvr_ui.$npm_package_version.tar.gz -C ./build .",
"postbuild": "tar -cvzf zlmediakit_nvr_ui.$npm_package_version.tar.gz -C ./build ."
},

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