Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Avoid claude error sin dev container

Jonathan ARNAULTafd4240505d1
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 6ff8dc9e..bd61678f 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -45,7 +45,11 @@ RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
# Set `DEVCONTAINER` environment variable to help with orientation
ENV DEVCONTAINER=true
+RUN mkdir -p /home/node/.cache/claude && chown node:node /home/node/.cache/claude
RUN mkdir -p /home/node/.cache/ms-playwright && chown node:node /home/node/.cache/ms-playwright
+RUN echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/node/.bashrc
+
+VOLUME /home/node/.cache/claude
VOLUME /home/node/.cache/ms-playwright
VOLUME /tmp
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 529f449a..fddc3028 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -9,7 +9,7 @@
"ghcr.io/devcontainers-extra/features/claude-code:2": {},
"ghcr.io/devcontainers-extra/features/neovim-apt-get:1": {}
},
- "postAttachCommand": "make install-playwright-browsers",
+ "postAttachCommand": "make devcontainer-configure",
"mounts": [
{
"type": "bind",
@@ -24,7 +24,7 @@
{
"type": "bind",
"source": "${localEnv:HOME}/.claude.json",
- "target": "/home/node/.claude.json,ro"
+ "target": "/home/node/.claude.json"
},
{
"type": "bind",
diff --git a/makefile b/makefile
index 1361d9d3..63655757 100644
--- a/makefile
+++ b/makefile
@@ -19,6 +19,9 @@ install: package.json ## install dependencies
install-playwright-browsers: install ## install the playwright browsers (chromium, firefox, webkit)
npx playwright install chromium
+devcontainer-configure: install-playwright-browsers
+ claude install
+
start-supabase: ## start supabase locally
npx supabase start