Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

TypeError: Cannot read properties of null (reading 'Env')

Aperta
#992 5 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@v-Kaniska244 ci sta già lavorando.

Dal 29/4/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Getting this error suddenly from CLI/Vscode/Cursor:

➜  devcontainer build --workspace-folder . --config .devcontainer/devcontainer.json --image-name=test
[3 ms] @devcontainers/cli 0.75.0. Node.js v20.12.2. darwin 24.3.0 arm64.
TypeError: Cannot read properties of null (reading 'Env')
    at o6 (/Users/jasondamour/.nvm/versions/node/v20.12.2/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:393:20372)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async y6 (/Users/jasondamour/.nvm/versions/node/v20.12.2/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:467:2352)
    at async dw (/Users/jasondamour/.nvm/versions/node/v20.12.2/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:467:1886)
    at async R7 (/Users/jasondamour/.nvm/versions/node/v20.12.2/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:667:2203)
    at async S7 (/Users/jasondamour/.nvm/versions/node/v20.12.2/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:666:4937)
    at async /Users/jasondamour/.nvm/versions/node/v20.12.2/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:1188
{"outcome":"error","message":"Cannot read properties of null (reading 'Env')","description":"An error occurred building the container."}

With the dockerfile:

FROM mcr.microsoft.com/devcontainers/base:1.2-ubuntu-22.04

Given I haven't upgraded the CLI in a while and this was working fine recently, I believe this is caused by a change to the base Docker image. Semi-confirmed by changing my base image to ubuntu:22.04 and it worked fine.

However, going to use this repo for the issue. If an image doesn't have an Env property, shouldn't the CLI still succeed?

Lingua principale
TypeScript
Stelle
3k
Fork
461
Merge medio
18m
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devcontainers/cli

Tutte le issue di devcontainers/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.