Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

SyntaxError while publishing: "Unexpected token r in JSON at position 0"

Offen
#224 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
docker, github-actions, typescript
Bereich
ci-cd, devops

Rechercherichtung

Reproduziere den Publish-Pfad aus .github/workflows/validate.yml unter Verwendung der gezeigten devcontainers/action-Konfiguration und des protokollierten devContainersSpecCLI.js-Stacks als Einstiegspunkte. Vergleiche die Validierung mit dem Veröffentlichen in der Registry und verfolge, welche Antwort an JSON.parse übergeben wird; fertig bedeutet, dass der Fehler mit einer eindeutigen Diagnose reproduzierbar ist oder das Veröffentlichen für das gemeldete Feature erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I'm trying to publish a feature but am failing to do so.
Although to me the contents of the repo seem correct it fails with an error that doesn't really tell me anything:

[2025-05-19T20:20:21.191Z] Packaging feature collection...
[2025-05-19T20:20:21.194Z] Processing feature: starship...
[2025-05-19T20:20:21.216Z] Packaged 1 features!
[2025-05-19T20:20:21.216Z] Processing feature: starship...
[2025-05-19T20:20:21.217Z] Fetching published versions...
[2025-05-19T20:20:21.314Z] Publishing tags: 1,1.0,1.0.0,latest...
[2025-05-19T20:20:21.316Z] Data layer digest: sha256:506a0c07c447a52f751d546fd465145f534790be0456c088a59f7b2af161284e (archive size: 6144)
[2025-05-19T20:20:21.316Z] Computed content digest from manifest: sha256:da7f47bc8d89feb98a7c3cdd108558b377e182e0accb6d0c58cd7039b5ac42ad
SyntaxError: Unexpected token r in JSON at position 0
    at JSON.parse (<anonymous>)
    at kJ (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:608:1596)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async mJ (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:605:579)
    at async cC (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:609:1298)
    at async Vz (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:609:2795)
    at async /opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:1188
::error::The process '/opt/acttoolcache/node/18.20.8/x64/bin/devcontainer' failed with exit code 1
::error::(!) Failed to publish Features.

I don't know what JSON this would be that it's failing to parse.

Using the action as follows (with env.REGISTRY_URL being a valid registry url which https://github.com/docker/login-action@v3 managed to successfully login to):

      - name: "Publish Features"
        uses: "https://github.com/devcontainers/action@v1"
        with:
          publish-features: "true"
          oci-registry: "${{ env.REGISTRY_URL }}"
          base-path-to-features: "./src"
          generate-docs: "false"

Also if I only validate the repo contents, using the contents of https://github.com/devcontainers/feature-starter/blob/main/.github/workflows/validate.yml, the validation passes successfully.

Vorherrschende Sprache
TypeScript
Sterne
90
Forks
33
Ø Merge
3 Std. 8 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus devcontainers/action

Alle Issues in devcontainers/action

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.