We had upgrade to node 17.4.0. After that Storybook started giving error on start:
Error: error:0308010C:digital envelope routines::unsupported
From what I found it's because we use 17.x node. But unfortunately we can't downgrade, so I wanted to have two versions of node and be able to switch between them depending on what I do. I installed 16.x node: nvm install v16.14.2 If I check currently used node version it will be 16.x, but when I run npm run storybook I see that it starts with version 17.x and fails. How can I setup my Storybook to be launching with version 16.x?
In your package.json: change this line. and have a look on this as well (https://itsmycode.com/error-digital-envelope-routines-unsupported/)
Check this out Getting error 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED'
"start": "react-scripts start"
to
"scripts": {
"start": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
"build": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build"
}
or
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With