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

Build hangs with Docker build #539

Open
Grumpier opened this issue Jun 21, 2024 · 2 comments
Open

Build hangs with Docker build #539

Grumpier opened this issue Jun 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Grumpier
Copy link

What's happening
On an Apple M1 Pro, craco build runs as expected.

However, docker build appears to be working but runs indefinitely. There is no error message.

Here is console log:
image

docker build works fine with react-scripts build.

Here is the Dockerfile:
image

CRACO version
7.1.0

CRACO config
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

module.exports = {
webpack: {
plugins: [
new BundleAnalyzerPlugin(),
],
},
}

package.json
{
"name": "my_camino_3d",
"version": "1.0.0",
"private": true,
"dependencies": {
"@auth0/auth0-react": "^1.12.0",
"@auth0/auth0-spa-js": "^2.1.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-transform-private-property-in-object": "^7.23.4",
"@babel/preset-env": "^7.23.9",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@googlemaps/react-wrapper": "^1.1.35",
"@mui/icons-material": "^5.10.9",
"@mui/lab": "^5.0.0-alpha.159",
"@mui/material": "^5.10.10",
"@mui/styled-engine": "^5.10.8",
"@mui/x-data-grid": "^6.10.1",
"@mui/x-data-grid-generator": "^6.10.0",
"@paypal/react-paypal-js": "^8.1.3",
"@react-email/components": "^0.0.14",
"@react-email/container": "0.0.8",
"@react-email/hr": "0.0.5",
"@react-email/render": "0.0.7",
"@react-email/text": "0.0.5",
"@react-google-maps/api": "^2.17.1",
"@react-three/drei": "^9.93.0",
"@react-three/fiber": "^8.15.13",
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.6.7",
"bson-objectid": "^2.0.4",
"chart.js": "^4.3.0",
"chartjs-plugin-annotation": "^3.0.1",
"google-map-react": "^2.2.1",
"leva": "^0.9.35",
"node-polyfill-webpack-plugin": "^2.0.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-cookie-consent": "^9.0.0",
"react-country-region-selector": "^3.6.1",
"react-dom": "^18.2.0",
"react-ga4": "^2.1.0",
"react-lazy-load-image-component": "^1.6.2",
"react-moving-text": "^0.0.7",
"react-redux": "^8.1.2",
"react-router-dom": "^6.4.3",
"react-scripts": "^5.0.1",
"react-select": "^5.7.3",
"react-swipeable-views-react-18-fix": "^0.14.1",
"react-swipeable-views-utils": "^0.14.0",
"react-virtualized-auto-sizer": "^1.0.20",
"react-window": "^1.8.9",
"react-window-infinite-loader": "^1.0.9",
"redux": "^4.2.1",
"redux-persist": "^6.0.0",
"sitemap": "^8.0.0",
"three": "^0.160.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"analyze": "craco build"
},
"proxy": "http://localhost:3001",
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@craco/craco": "^7.1.0",
"webpack-bundle-analyzer": "^4.10.2"
}
}

@Grumpier Grumpier added the bug Something isn't working label Jun 21, 2024
@Grumpier
Copy link
Author

Correciton - the failing package.json has "build": "craco build" in scripts.

@fasiha
Copy link

fasiha commented Aug 1, 2024

webpack/webpack#8568 is several years old but possibly related? The solution there was to run the Docker container as a non-root user: if you run as root user, a dependency spends a lot of time trying to parse the contents of /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants