Skip to content

fix: update Python devcontainer image to resolve Node 16 - #76

Merged
ehiber merged 2 commits into
4GeeksAcademy:masterfrom
mfagundez-4geeks:master
Jun 24, 2026
Merged

fix: update Python devcontainer image to resolve Node 16#76
ehiber merged 2 commits into
4GeeksAcademy:masterfrom
mfagundez-4geeks:master

Conversation

@mfagundez-4geeks

Copy link
Copy Markdown
Contributor

Problem

When opening a new Codespace, learnpack start failed immediately with:

[ERR_REQUIRE_ESM]: require() of ES Module (...) not supported Error: command start not found

LearnPack 5.x depends on packages (e.g. syllable) that are ESM-only and
incompatible with Node 16.

Root cause

The base image mcr.microsoft.com/devcontainers/python:0-3.10 ships with
nvm and Node 16.20.2 pre-installed. When the node:1 dev container
feature runs and finds nvm already present, it attempts to install Node 22
on top of it, but the installation silently fails or does not update the
default alias. As a result, onCreateCommand runs npm install -g against
the only available Node version — 16 — and LearnPack 5.x ends up installed
in an incompatible runtime.

Fix

Replace the legacy base image with the current official variant:

- "image": "mcr.microsoft.com/devcontainers/python:0-3.10"
+ "image": "mcr.microsoft.com/devcontainers/python:3.10-bookworm"

@ehiber
ehiber merged commit 19d5e43 into 4GeeksAcademy:master Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants