# WebPackBuild:Failed with code: 'ERR\_OSSL\_EVP\_UNSUPPORTED', reason: 'unsupported', library: 'digital envelope routines',

**URL:** <https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548>\
**Category:** dev\
**Tags:** virtocommercecli\
**Created:** [February 20, 2023, 1:45pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548 "2023-02-20T13:45:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![OlegoO](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/olegoo/32/27_2.png) [@OlegoO](https://www.virtocommerce.org/u/OlegoO)\
**Post date:** [February 20, 2023, 1:45pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/1 "2023-02-20T13:45:57Z")

</div>

**Error details:**  
[ERR] WebPackBuild: opensslErrorStack: [‘error:03000086:digital envelope routines::initialization error’],  
[ERR] WebPackBuild: library: ‘digital envelope routines’,  
[ERR] WebPackBuild: reason: ‘unsupported’,  
[ERR] WebPackBuild: code: ‘ERR\_OSSL\_EVP\_UNSUPPORTED’

```auto
  [ERR] WebPackBuild: at /home/runner/work/vc-module-inventory/vc-module-inventory/src/VirtoCommerce.InventoryModule.Web/node_modules/graceful-fs/graceful-fs.js:115:16
  [ERR] WebPackBuild: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  [ERR] WebPackBuild: opensslErrorStack: ['error:03000086:digital envelope routines::initialization error'],
  [ERR] WebPackBuild: library: 'digital envelope routines',
  [ERR] WebPackBuild: reason: 'unsupported',
  [ERR] WebPackBuild: code: 'ERR_OSSL_EVP_UNSUPPORTED'
  [ERR] WebPackBuild: }
  [ERR] WebPackBuild: Node.js v18.14.1
  [ERR] WebPackBuild: Target WebPackBuild failed
​
═══════════════════════════════════════
Target Status Duration
───────────────────────────────────────
Clean Skipped // SkipReason: via --skip parameter
Restore Skipped // SkipReason: via --skip parameter
Compile Skipped // SkipReason: via --skip parameter
WebPackBuild Failed 0:13 // ProcessException: Process 'npm' exited with code 1.
Test Skipped // SkipReason: via --skip parameter
Publish NotRun              
Compress NotRun              
───────────────────────────────────────
Total 0:13
═══════════════════════════════════════
​
Build failed on 02/20/2023 11:21:34. (╯°□°）╯︵ ┻━┻

```

---

<div class="post-metadata">

**Author:** ![OlegoO](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/olegoo/32/27_2.png) [@OlegoO](https://www.virtocommerce.org/u/OlegoO)\
**Post date:** [February 20, 2023, 1:51pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/2 "2023-02-20T13:51:58Z")

</div>

To resolve the issue, please setup NodeJS 16.x.

On local machine please download and install [Iv16.14.0 (nodejs.org)](https://nodejs.org/download/release/v16.14.0/)

On GitHub workflow, you need to [Setup Node.js environment](https://github.com/marketplace/actions/setup-node-js-environment#usage):

```auto
      - name: Set up Node 16
        uses: actions/setup-node@v2
        with:
            node-version: '16'

```

---

<div class="post-metadata">

**Author:** ![alexeyshibanov](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/alexeyshibanov/32/918_2.png) [@alexeyshibanov](https://www.virtocommerce.org/u/alexeyshibanov)\
**Post date:** [February 20, 2023, 2:16pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/3 "2023-02-20T14:16:34Z")

</div>

Also, you can set Node.js options before _compress_ the module solution:  
$env:NODE\_OPTIONS=“–openssl-legacy-provider”

---

<div class="post-metadata">

**Author:** ![rahul](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/rahul/32/1060_2.png) [@rahul](https://www.virtocommerce.org/u/rahul)\
**Post date:** [February 25, 2023, 3:21pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/4 "2023-02-25T15:21:40Z")

</div>

Thanks for posting the solution. We started running into this error in our projects. 🙂

@OlegoO Is there any near term plan to upgrade dependencies so that we are not bypassing the openssl check?

---

<div class="post-metadata">

**Author:** ![OlegoO](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/olegoo/32/27_2.png) [@OlegoO](https://www.virtocommerce.org/u/OlegoO)\
**Post date:** [February 25, 2023, 8:15pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/5 "2023-02-25T20:15:17Z")

</div>

We are working under update for using NodeJS LTS.

---

<div class="post-metadata">

**Author:** ![OlegoO](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/olegoo/32/27_2.png) [@OlegoO](https://www.virtocommerce.org/u/OlegoO)\
**Post date:** [March 3, 2023, 4:17pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/6 "2023-03-03T16:17:58Z")

</div>

If you plan update to module to support WebPack 5 and NodeJS 18, please use files from this PR:

[PT-9395: Update to support NodeJS 18 LST and WebPack 5](https://github.com/VirtoCommerce/vc-module-catalog/pull/665/files)

Usually, you can just copy, override existen files: webpack.config.js, package.json and package-lock.json and change moduleId in webpack.config.js.

Some other adjustments could be required, if you used custom components.

---

<div class="post-metadata">

**Author:** ![OlegoO](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/olegoo/32/27_2.png) [@OlegoO](https://www.virtocommerce.org/u/OlegoO)\
**Post date:** [March 10, 2023, 12:06pm UTC](https://www.virtocommerce.org/t/webpackbuild-failed-with-code-err-ossl-evp-unsupported-reason-unsupported-library-digital-envelope-routines/548/7 "2023-03-10T12:06:48Z")

</div>

We have update all VC modules to support NodeJS LTS and WebPack 5.

Also, you can use [vc-cli-module-template to get actual version of files](https://github.com/VirtoCommerce/vc-cli-module-template/tree/main/templates/vc-module-template/vc-module-%7BKebabModuleName%7D/src/%7BNamespace%7D.Web).
