on ‎2023 Jul 26 11:00 AM
Hello Everyone,
I have created a react application in BAS. It works fine in developer environment. But when I push the application to Cloud Foundry, the application crashes when the instance starts.
Things I have tried to resolve the issue:
1. Deleted the application from Cloud Foundary and reinstalled it.
2. Removed the node modules in the source file and reinstalled it.
3. Downgraded the Node version to previous version.
Does anyone know what kind of error this is and how to resolve it? I am assuming that there might be a dependency that is depricated from npm which is causing the error. I have been facing deprication error a lot with React applications. Is there any way to overcome this issue while coding with React?
Request clarification before answering.
It appears you are running the react development server in cloud foundry. Wouldn't you rather build and publish the built results to cloud foundry? If the application requires hosting/serving, i.e. application doesn't have own web server, you can use SAP's approuter or nginx/staticfile buildpack.
As far as the error you see is concerned, it appears to be a known issue with webpack. The suggestion appears to be to set environment variable 'NODE_OPTIONS=--openssl-legacy-provider' or update your react-scripts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.