GitHub user dosubot[bot] added a comment to the discussion: local dev env setup

<!-- Answer -->
The npm ENOTEMPTY error during frontend build in Docker usually means there are 
leftover files or directories (often in node_modules) that npm can't clean up 
during install or rename operations. This is common in Docker setups, 
especially if node_modules is mounted or cached between runs.

To resolve this, try these steps:

1. Clean up all residual files and volumes, especially node_modules, by running:
   ```
   docker-compose down -v
   docker system prune --volumes
   ```
   Then rebuild your containers. This has resolved similar ENOTEMPTY errors for 
others in the Superset project 
[(source)](https://github.com/apache/superset/issues/31951).

2. You can also trigger a cleanup inside Docker by setting the environment 
variable before starting:
   ```
   export NPM_RUN_PRUNE=true
   docker compose up
   ```
   This will run `npm run prune` (which deletes node_modules and related build 
artifacts) before npm install 
[(source)](https://github.com/apache/superset/blob/23b1fe3b9ebfbde7ccd3c40fcd7a60b6c5ab06df/docker/docker-frontend.sh).

3. Make sure your node and npm versions match those specified in 
superset-frontend/package.json (node ^20.16.0, npm ^10.8.1). Mismatched 
versions can cause subtle install errors 
[(source)](https://github.com/apache/superset/issues/33050).

4. If you have less than 16GB RAM or persistent npm issues in Docker, set 
`BUILD_SUPERSET_FRONTEND_IN_DOCKER=false` and run `npm install` and `npm run 
dev` locally instead of inside Docker 
[(source)](https://github.com/apache/superset/blob/23b1fe3b9ebfbde7ccd3c40fcd7a60b6c5ab06df/docs/docs/installation/docker-compose.mdx).

If you want more details or step-by-step instructions, the official Docker 
Compose setup docs for Superset cover these troubleshooting tips and 
environment variables in depth 
[(source)](https://github.com/apache/superset/blob/23b1fe3b9ebfbde7ccd3c40fcd7a60b6c5ab06df/docs/docs/installation/docker-compose.mdx).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/7010f81e-9470-4113-b7b8-4af500901911?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34052)

GitHub link: 
https://github.com/apache/superset/discussions/34052#discussioncomment-13651536

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to