-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-scripts fails to build project with Node 17 #11562
Comments
This looks like a relevant discussion related to this issue: |
Having the same issue. Node |
Yes @Gnito that's it I think. So it is probably either Webpack's to update something, or react-scripts' to change some config, right? |
in your package.json: |
Doing this results in a The only real fix will likely be the release of CRA v5. |
Actually it seems that this won't necessarily fix the issue alone. WebPack does plan to change the default hash function in WebPack 6 but cannot change it in 4 or 5. CRA needs to change the |
Could be fixed by #11597 |
Merged #11597 just before, and currently testing on local computer. |
I tested out the I'm still getting this error but now it's due to CRA v5 still using We may need #11213 before CRA v5 will work on Node 17. |
On MBP w/M1, running Node v17, to run React with I tried
Pretty annoying, but hey, I've heard things change all the change in this industry and a few months from now, someone will see this comment and things will be different then as well. |
If you need to support both 17 and older NodeJS versions you can use if-node-version to execute different commands for different NodeJS versions: {
"scripts": {
"build": "if-node-version '>= 17' && react-scripts --openssl-legacy-provider build || react-scripts build",
}
} |
Looks like this has been fixed. |
It work Thanks. "scripts": { |
why not to pass to webpack config to use some modern hash function instead of deprecated md4 https://webpack.js.org/configuration/output/#outputhashfunction ? |
CRA is now a tech debt. |
Thanks Pat! That worked for me also. |
11562 |
Node 17 fixed a security issue related to crypto which is incompatible with the current default settings of webpack used via react-scripts. This is unfortunate and this change thus adds a special node commandline argument to make Node 17 use the previous behavior. Reference: facebook/create-react-app#11562
Node 17 fixed a security issue related to crypto which is incompatible with the current default settings of webpack used via react-scripts. This is unfortunate and this change thus adds a special node commandline argument to make Node 17 use the previous behavior. Reference: facebook/create-react-app#11562
for react-app-rewired use it like this |
…OL is 2023-09-11 This does the following: * Add NODE_OPTIONS=--openssl-legacy-provider (not needed once we upgrade to react-scripts v5 or remove/replace react-scripts) * Only adds NODE_OPTIONS when run on node 18 or later * Performs frontend-code-test on node 18 * Does _not_ run backend_deploy/frontend_deploy with node 18. This can be changed via using cimg/python:3.10-node (versions after 3.10.8-node use node 18 instead of node 16) Node 16 EOL Notice: https://nodejs.org/en/blog/announcements/nodejs16-eol create-react-app --openssl-legacy-provider: facebook/create-react-app#11562 Signed-off-by: Taylor Smock <tsmock@meta.com>
Hell |
I had the same issue with Node v18.13.0 Test again |
Kinding58 Wallet has been created successfully |
Kinding58 Wallet shall be used for various pi transactions |
It's done |
This is Paulk58 Netface Wallet created on 10th November 2023 |
This is Paulk58 Whatsapp wallet re-created on 10 th November 2023 |
This is Paulk58 Whatsapp wallet re-created on 10 November 2023 |
|
See facebook/create-react-app#11562. react-scripts crashes without this option since Node v17. This version of Node was released in 2021, so it seems more than reasonable to add this change directly to package.json.
SBWJC2MWIZ3UX66U4R6EEXEBBCZLAJVOWZNGUMM3V4MPMJUGNTZ3FO5C |
1 similar comment
SBWJC2MWIZ3UX66U4R6EEXEBBCZLAJVOWZNGUMM3V4MPMJUGNTZ3FO5C |
GDFXR3RGDSEVFRQ44T5B5LXJOPBEE7B6POZN3SMWY7XJIX753JLMEWI2 |
|
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 and it failed. (in both my local machine and the CI-CD machine)
And these were the logs:
Did you try recovering your dependencies?
yes. in both local machine and CI-CD machine I re-installed all the dependencies
Which terms did you search for in User Guide?
I searched Google for
error:0308010C:digital envelope routines::unsupported
with and without the0308010C
partEnvironment
Steps to reproduce
(Write your steps here:)
npm run build
to see it builds completely finenpm run build
again to see it failExpected behavior
to build flawlessly
Actual behavior
The build failed with errors printed above!
Note
I know that it is mostly not related to create-react-app, but another package, maybe webpack or it's dependencies. But as I cannot dig down, I write this issue here so the professionals can track it further.
Thanks
The text was updated successfully, but these errors were encountered: