Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

new _Hash(algorithm, xofLen) when npm run dev

Tags:

npm

nuxt.js

   ╭───────────────────────────────────────╮
   │                                       │
   │   Nuxt @ v2.15.8                      │
   │                                       │
   │   ▸ Environment: development          │
   │   ▸ Rendering:   server-side          │
   │   ▸ Target:      server               │
   │                                       │
   │   Listening: http://localhost:3000/   │
   │                                       │
   ╰───────────────────────────────────────╯

i Preparing project for development                                           17:35:26
i Initial build may take a while                                              17:35:26
i Discovered Components: .nuxt/components/readme.md                           17:35:26
√ Builder initialized                                                         17:35:26
√ Nuxt files generated                                                        17:35:26

* Client █████████████████████████ building (10%) 1/2 modules 1 active
 node_modules\webpack-hot-middleware\client.js

* Server █████████████████████████ building (10%) 1/1 modules 0 active


node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\lib\NormalModule.js:471:10)
    at F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\lib\NormalModule.js:503:5
    at F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\lib\NormalModule.js:358:12
    at F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\web    at iterateNormalLoaders (F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:214:10)       
    at Array.<anonymous> (F:\1.A software Company careers test\CyberElysium\test\todo-nuxt\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:205:4) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' 
],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
like image 617
Noor Muhammed Avatar asked Mar 20 '26 05:03

Noor Muhammed


1 Answers

I faced the same issue when running an Vue+Nuxt application and was able to get past it by using the command

export NODE_OPTIONS=--openssl-legacy-provider

Before adding the command: enter image description here

After running the command enter image description here

like image 105
MOHAMED RILWAN S Avatar answered Mar 24 '26 22:03

MOHAMED RILWAN S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!