在我的服务器(Debian Sid)的例行更新后,我不再能够开始零ui开发(实际上我无法启动任何nodejs
开发服务器):
zero@zdev:~/zero-ui$ ZU_CONTROLLER_TOKEN=whatever yarnpkg dev
[1] [nodemon] 2.0.15
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching path(s): *.*
[1] [nodemon] watching extensions: js,mjs,json
[1] [nodemon] starting `node ./bin/www`
[0] ℹ 「wds」: Project is running at http://192.168.7.122/
[0] ℹ 「wds」: webpack output is served from /app
[0] ℹ 「wds」: Content not from webpack is served from /home/zero/zero-ui/frontend/public
[0] ℹ 「wds」: 404s will fallback to /app/
[0] Starting the development server...
[0]
[0] Error: error:0308010C:digital envelope routines::unsupported
[0] at new Hash (node:internal/crypto/hash:67:19)
[0] at Object.createHash (node:crypto:130:10)
[0] at module.exports (/home/zero/zero-ui/node_modules/webpack/lib/util/createHash.js:135:53)
[0] at NormalModule._initBuildHash (/home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:417:16)
[0] at handleParseError (/home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:471:10)
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:503:5
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:358:12
[0] at /home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:373:3
[0] at iterateNormalLoaders (/home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
[0] at iterateNormalLoaders (/home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
[0] /home/zero/zero-ui/node_modules/react-scripts/scripts/start.js:19
[0] throw err;
[0] ^
[0]
[0] Error: error:0308010C:digital envelope routines::unsupported
[0] at new Hash (node:internal/crypto/hash:67:19)
[0] at Object.createHash (node:crypto:130:10)
[0] at module.exports (/home/zero/zero-ui/node_modules/webpack/lib/util/createHash.js:135:53)
[0] at NormalModule._initBuildHash (/home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:417:16)
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:452:10
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:323:13
[0] at /home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:367:11
[0] at /home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:233:18
[0] at context.callback (/home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
[0] at /home/zero/zero-ui/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
[0] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[0] library: 'digital envelope routines',
[0] reason: 'unsupported',
[0] code: 'ERR_OSSL_EVP_UNSUPPORTED'
[0] }
[0] cd frontend && cross-env FAST_REFRESH=true yarn start exited with code 1
注意,这似乎不是我在这里和互联网上其他地方发现的问题(打破node
v16->v17的变化),因为我目前有:
zero@zdev:~/zero-ui$ node --version
v16.15.0
注意:尽管如此,我还是尝试将NODE_OPTIONS=--openssl-legacy-provider
添加到我的选项中,但这并不奇怪,不起作用(/usr/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
,我认为这意味着该选项在v17中添加,并且在破坏性更改之前是无用的)。
我强烈怀疑是debian侧的某个更新引起的,但我无法理解是哪个。
还要注意这是特定于当前Debian Sid的:它可以在全新的安装(使用容器)上复制,并且将而不是似乎在Debian Bookworm上做了完全相同的安装。
我怎样才能克服这个?蒂娅!
我有同样的问题。我已经将node.js升级到17.7.2并遇到此错误。然后升级到18.4,仍然出现错误。然后使用遗留选项-没有成功。然后将node.js降级到16.15.1,尝试升级和降级webpack (4.46 =>5.63 =比;4.46)但我还是弄错了。即使卸载node.js,删除所有的缓存文件夹,重新安装node.js也无济于事。
我绝对不明白的是,错误信息后的最后一行是"Node.js v17.7.2"这在我的系统上是绝对没有的。
node:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:135:10)
at module.exports (C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacklibutilcreateHash.js:135:53)
at NormalModule._initBuildHash (C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacklibNormalModule.js:417:16)
at handleParseError (C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacklibNormalModule.js:471:10)
at C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacklibNormalModule.js:503:5
at C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacklibNormalModule.js:358:12
at C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacknode_modulesloader-runnerlibLoaderRunner.js:373:3
at iterateNormalLoaders (C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacknode_modulesloader-runnerlibLoaderRunner.js:214:10)
at Array.<anonymous> (C:Userspaulyrepossourcesdevnuxttest-appnode_moduleswebpacknode_modulesloader-runnerlibLoaderRunner.js:205:4)
at Storage.finished (C:Userspaulyrepossourcesdevnuxttest-appnode_modulesenhanced-resolvelibCachedInputFileSystem.js:55:16)
at C:Userspaulyrepossourcesdevnuxttest-appnode_modulesenhanced-resolvelibCachedInputFileSystem.js:91:9
at C:Userspaulyrepossourcesdevnuxttest-appnode_modulesgraceful-fsgraceful-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 v17.7.2
这整个问题开始于"npx create- next -app",简单地说,当我试图创建我的下一个应用程序。真是一团糟。