Skip to content
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

Implicit Dependency Issue in babel-preset-react-app Causes Docker Container Failure on EC2 #17033

Open
choijw1004 opened this issue Mar 12, 2025 · 0 comments

Comments

@choijw1004
Copy link

I am experiencing an issue with the babel-preset-react-app package. It appears that this package relies on @babel/plugin-proposal-private-property-in-object without explicitly listing it as a dependency. In my local development environment, this hasn't caused issues because the plugin is present in my node_modules for other reasons. However, this implicit dependency may lead to unexpected problems.

Locally, I resolved the warning by adding @babel/plugin-proposal-private-property-in-object to my devDependencies. Despite this workaround, when I deploy my React project to an AWS EC2 instance using a Docker image built from my repository, the container fails to start. Although the build completes successfully, the application does not run on EC2.

Here is the relevant snippet from my package.json:

json
"devDependencies": {
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.8",
"@babel/plugin-proposal-private-property-in-object": "^7.21.0"
}

Summary:

Locally, with the above devDependencies, everything works fine.
When deploying the Docker container to EC2 without explicitly including @babel/plugin-proposal-private-property-in-object (beyond the local workaround), the application fails to start.
The build succeeds, but the container does not run on EC2.
Could you please provide guidance on why this dependency issue might cause the application to fail on EC2 but not locally, and how to properly resolve it?

Best regards,
Choi Jang-Woo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant