{"id":86,"date":"2022-03-13T10:27:14","date_gmt":"2022-03-13T01:27:14","guid":{"rendered":"https:\/\/global-hack.com\/blog\/?p=86"},"modified":"2022-03-13T10:27:14","modified_gmt":"2022-03-13T01:27:14","slug":"%e3%80%90node-js%e3%80%91-error-error0308010cdigital-envelope-routinesunsupported%e3%80%90npm%e3%80%91","status":"publish","type":"post","link":"https:\/\/global-hack.com\/blog\/archives\/86","title":{"rendered":"\u3010Node.js\u3011 Error: error:0308010C:digital envelope routines::unsupported\u3010npm\u3011"},"content":{"rendered":"<h3>webpack\u3067\u306e\u30a8\u30e9\u30fc<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>node:internal\/crypto\/hash:67\r\n  this[kHandle] = new _Hash(algorithm, xofLen);\r\n                  ^\r\n\r\nError: error:0308010C:digital envelope routines::unsupported\r\n    at new Hash (node:internal\/crypto\/hash:67:19)\r\n    at Object.createHash (node:crypto:130:10)\r\n\r\n    \uff08\u7565\uff09\r\n\r\n    59:103 {\r\n  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],\r\n  library: 'digital envelope routines',\r\n  reason: 'unsupported',\r\n  code: 'ERR_OSSL_EVP_UNSUPPORTED'\r\n}<\/code><\/pre>\n<\/div>\n<p>Docker\u74b0\u5883\u4e0b\u3067\u958b\u767a\u4e2d\u306b<code>npm run dev<\/code>\u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u8d77\u304d\u305f\u30a8\u30e9\u30fc\u3002<\/p>\n<h4>\u89e3\u6c7a\u624b\u6bb5<\/h4>\n<p><a href=\"https:\/\/github.com\/gh640\/nextjs-blog-example-ja\/issues\/49\" title=\"Node.js v17.x \u3067 ERR_OSSL_EVP_UNSUPPORTED \u30a8\u30e9\u30fc\">Node.js v17.x \u3067 ERR_OSSL_EVP_UNSUPPORTED \u30a8\u30e9\u30fc<\/a><\/p>\n<p>\u4e0a\u8a18github\u30d5\u30a9\u30fc\u30e9\u30e0\u306b\u3066\u300cNode.js v17 \u3067 OpenSSL 3.0 \u3092\u542b\u3080\u5f62\u306b\u5909\u308f\u3063\u305f\u3053\u3068\u306b\u8d77\u56e0\u3059\u308b\u300d\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305anodebrew\u3092\u4f7f\u3063\u3066v16\u306b\u4e0b\u3052\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<h3>Node.js v16\u306b\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ nodebrew ls-remote<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u306b\u3066\u30d0\u30fc\u30b8\u30e7\u30f3\u4e00\u89a7\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6    \r\n\r\nv0.1.0    v0.1.1    v0.1.2    v0.1.3    v0.1.4    v0.1.5    v0.1.6    v0.1.7\r\nv0.1.8    v0.1.9    v0.1.10   v0.1.11   v0.1.12   v0.1.13   v0.1.14   v0.1.15\r\nv0.1.16   v0.1.17   v0.1.18   v0.1.19   v0.1.20   v0.1.21   v0.1.22   v0.1.23\r\nv0.1.24   v0.1.25   v0.1.26   v0.1.27   v0.1.28   v0.1.29   v0.1.30   v0.1.31\r\nv0.1.32   v0.1.33   v0.1.90   v0.1.91   v0.1.92   v0.1.93   v0.1.94   v0.1.95\r\nv0.1.96   v0.1.97   v0.1.98   v0.1.99   v0.1.100  v0.1.101  v0.1.102  v0.1.103\r\nv0.1.104  \r\n\r\n\uff08\u7565\uff09\r\n\r\nv16.0.0   v16.1.0   v16.2.0   v16.3.0   v16.4.0   v16.4.1   v16.4.2   v16.5.0\r\nv16.6.0   v16.6.1   v16.6.2   v16.7.0   v16.8.0   v16.9.0   v16.9.1   v16.10.0\r\nv16.11.0  v16.11.1  v16.12.0  v16.13.0  v16.13.1  v16.13.2  v16.14.0  \r\n\r\nv17.0.0   v17.0.1   v17.1.0   v17.2.0   v17.3.0   v17.3.1   v17.4.0   v17.5.0\r\nv17.6.0   v17.7.0   v17.7.1<\/code><\/pre>\n<\/div>\n<p>v16\u306e\u4e2d\u3067\u4e00\u756a\u65b0\u3057\u3044\u306e\u304c<code>v16.14.0<\/code>\u306a\u306e\u3067\u3001\u3053\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3044\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ nodebrew install-binary v16.14.0<\/code><\/pre>\n<\/div>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u304b\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ nodebrew ls<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066\u51fa\u529b\u3055\u308c\u305f\u7d50\u679c\u304c\u3001\u4e0b\u8a18\u306e\u5229\u7528\u53ef\u80fd\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u4e00\u89a7\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>v12.16.1\r\nv16.7.0\r\nv16.14.0\r\nv17.3.0\r\n\r\ncurrent: v17.3.0<\/code><\/pre>\n<\/div>\n<p>\u73fe\u5728\u306f<code>v17.3.0<\/code>\u306a\u306e\u3067\u3001\u6b21\u306f\u3053\u308c\u3092<code>v16.14.0<\/code>\u306b\u3057\u307e\u3059\u3002<\/p>\n<h3>nodebrew\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u5207\u308a\u66ff\u3048<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ nodebrew use v16.14.0<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002<\/p>\n<p>\u5148\u307b\u3069\u306e<code>current: v17.3.0<\/code>\u306e\u90e8\u5206\u306b\u5909\u5316\u304c\u3042\u3063\u305f\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ nodebrew ls<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>v12.16.1\r\nv16.7.0\r\nv16.14.0\r\nv17.3.0\r\n\r\ncurrent: v16.14.0<\/code><\/pre>\n<\/div>\n<p><code>current: v16.14.0<\/code>\u306b\u5909\u308f\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3>ERR_OSSL_EVP_UNSUPPORTED\u30a8\u30e9\u30fc\u306f\u89e3\u6c7a<\/h3>\n<p>\u5f53\u521d\u306e\u76ee\u7684\u3067\u3042\u308b<code>npm run dev<\/code>\u306f\u554f\u984c\u306a\u304f\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306f\u3068\u306b\u304b\u304f\u958b\u767a\u3092\u524d\u306b\u9032\u3081\u305f\u304b\u3063\u305f\u306e\u3067\u3001Node.js\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4e0b\u3052\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u9078\u629e\u3057\u307e\u3057\u305f\u304c\u3001\u4ed6\u306b\u3082\u300cwebpack.config.js\u300d\u306b\u300chashFunction: &#8220;xxhash64&#8243;\u300d\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3084\u74b0\u5883\u5909\u6570\u306b\u300cexport NODE_OPTIONS=&#8211;openssl-legacy-provider\u300d\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u5207\u308a\u66ff\u3048\u306b\u3064\u3044\u3066\u306f\u3001\u4eca\u56de\u300c<span>nodebrew<\/span>\u300d\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u304c\u300cn\u300d\u3084\u300c<span>nodenv<\/span>\u300d\u300cnvm\u300d\u3068\u3044\u3063\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30c4\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u662f\u975e\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>webpack\u3067\u306e\u30a8\u30e9\u30fc node:internal\/crypto\/hash:67 this[kHandle] = new _Hash(algorithm, xofLen); ^ Error: error:0308010C:digital  <a class=\"mh-excerpt-more\" href=\"https:\/\/global-hack.com\/blog\/archives\/86\" title=\"\u3010Node.js\u3011 Error: error:0308010C:digital envelope routines::unsupported\u3010npm\u3011\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":89,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[42,44,43],"class_list":{"0":"post-86","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-node-js","8":"tag-nodebrew","9":"tag-npm","10":"tag-webpack"},"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/global-hack.com\/blog\/wp-content\/uploads\/2022\/03\/command-option-control.jpg","_links":{"self":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":0,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/media\/89"}],"wp:attachment":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}