{"id":807,"date":"2023-02-22T02:32:00","date_gmt":"2023-02-22T02:32:00","guid":{"rendered":"http:\/\/54.202.34.90\/?p=807"},"modified":"2023-02-22T02:32:02","modified_gmt":"2023-02-22T02:32:02","slug":"nasty-npm-error","status":"publish","type":"post","link":"https:\/\/mc.dev\/nasty-npm-error\/","title":{"rendered":"Nasty NPM Error"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"134\" src=\"http:\/\/54.202.34.90\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.26.43-PM-1024x134.png\" alt=\"\" class=\"wp-image-808\" srcset=\"https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.26.43-PM-1024x134.png 1024w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.26.43-PM-300x39.png 300w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.26.43-PM-768x101.png 768w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.26.43-PM-1536x202.png 1536w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.26.43-PM-2048x269.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Looks like somebody broke something!  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Somewhere between Node v18 and Webpack 5, this little error started appearing:  &#8216;digital envelope routines::initialization error&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, I found a pretty simple workaround:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In your <code>package.json<\/code> file, add this prefix to the scripts that break:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><code>export NODE_OPTIONS=--openssl-legacy-provider<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For example, instead of just <code>start-storybook -p 6006<\/code>, add this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"42\" src=\"http:\/\/54.202.34.90\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.29.19-PM-1024x42.png\" alt=\"\" class=\"wp-image-809\" srcset=\"https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.29.19-PM-1024x42.png 1024w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.29.19-PM-300x12.png 300w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.29.19-PM-768x31.png 768w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.29.19-PM-1536x62.png 1536w, https:\/\/mc.dev\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-21-at-6.29.19-PM.png 1874w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looks like somebody broke something! Somewhere between Node v18 and Webpack 5, this little error started appearing: &#8216;digital envelope routines::initialization error&#8217; Fortunately, I found a pretty simple workaround: In your package.json file, add this prefix to the scripts that break: export NODE_OPTIONS=&#8211;openssl-legacy-provider For example, instead of just start-storybook -p 6006, add this:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-807","post","type-post","status-publish","format-standard","category-ui","czr-hentry"],"_links":{"self":[{"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/posts\/807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/comments?post=807"}],"version-history":[{"count":2,"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/posts\/807\/revisions"}],"predecessor-version":[{"id":811,"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/posts\/807\/revisions\/811"}],"wp:attachment":[{"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/media?parent=807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/categories?post=807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mc.dev\/wp-json\/wp\/v2\/tags?post=807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}