question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work on Node 17

See original GitHub issue

Maintainer’s note: Mix v6.0.36 should fix this problem for most. If you have further issues please add a comment with details about your environment and setup.


  • Laravel Mix Version: v6.0.0 (npm list --depth=0)
  • Node Version (node -v): 17.0.1
  • NPM Version (npm -v): 8.1.1
  • OS: Windows/Linux/WSL2

Description:

Using the package gives the following error:

[webpack-cli] Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at BulkUpdateDecorator.hashFactory (S:\Project\node_modules\webpack\lib\util\createHash.js:155:18)
    at BulkUpdateDecorator.digest (S:\Project\node_modules\webpack\lib\util\createHash.js:80:21)
    at S:\Project\node_modules\webpack\lib\DefinePlugin.js:595:38
    at Hook.eval [as call] (eval at create (S:\Project\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:194:1)
    at Hook.CALL_DELEGATE [as _call] (S:\Project\node_modules\tapable\lib\Hook.js:14:14)
    at Compiler.newCompilation (S:\Project\node_modules\webpack\lib\Compiler.js:1053:26)
    at S:\Project\node_modules\webpack\lib\Compiler.js:1097:29
    at Hook.eval [as callAsync] (eval at create (S:\Project\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:22:1) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Steps To Reproduce:

npm run dev

Related

https://github.com/webpack/webpack/issues/14532

Woraround

There is a workaround:

export NODE_OPTIONS=--openssl-legacy-provider

For what I could gather, latest node changes OpenSSL implementation and this makes Webpack FUBAR. The above workaround forces to use the “legacy” provider.

That or use Vite or Snowpack 🤐

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:14

github_iconTop GitHub Comments

2reactions
thecrypticacecommented, Oct 28, 2021

Can one of you seeing this issue test the fix/node-17 branch? https://github.com/laravel-mix/laravel-mix/tree/fix/node-17

This should theoretically detect whether or not the openssl legacy provider flag is required when running Node 17 or higher.

0reactions
thecrypticacecommented, Oct 28, 2021

🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updated my node version to v17.3.0 and local host is not able ...
Installed a stable version of node. sudo n 11.14.0. Remember to uninstall the node_modules folder and run npm install to install the new...
Read more >
react-scripts fails to build project with Node 17 #11562 - GitHub
Describe the bug we have a CRA app, it used to build with Node 14.x very fine, today I upgrade nodejs to 17.0.0...
Read more >
15 Common Error Codes in Node.js and How to Fix Them
Therefore, we've compiled this list of 15 common Node.js errors along with one or more strategies to follow to fix each one.
Read more >
How to fix 'npm does not support Node.js v14' error on ...
My first attempt was updating over the top of my existing node.js installation. I then tried uninstalling node.js installation (Windows Add/ ...
Read more >
Node.js 17 Reached EOL: What Does That Mean for You?
With Node.js 17 reaching end of life, it's time to look at what you need to change to keep using a supported version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found