Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token : in JSON at position 3 for rc builds #24

Open
richardlau opened this issue Oct 16, 2023 · 1 comment
Open

Unexpected token : in JSON at position 3 for rc builds #24

richardlau opened this issue Oct 16, 2023 · 1 comment

Comments

@richardlau
Copy link
Member

As part of nodejs/build#3524 I've manually run the promotion script on the non-release builds, and I've noticed lots of errors like the following for the rc builds:

SyntaxError: Unexpected token : in JSON at position 3
    at JSON.parse (<anonymous>)
    at /usr/lib/node_modules/nodejs-dist-indexer/dist-indexer.js:119:19
    at BufferListStream._callback (/usr/lib/node_modules/nodejs-dist-indexer/dist-indexer.js:101:5)
    at BufferListStream.end (/usr/lib/node_modules/nodejs-dist-indexer/node_modules/bl/bl.js:65:10)
    at DestroyableTransform.onend (/usr/lib/node_modules/nodejs-dist-indexer/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
    at Object.onceWrapper (node:events:627:28)
    at DestroyableTransform.emit (node:events:525:35)
    at /usr/lib/node_modules/nodejs-dist-indexer/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:965:16
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
(ignoring error fetching npm version for node/v0.10.44-rc.1)

My guess would be that e.g. v0.10.44-rc.1 isn't mapping to a valid git reference when the substitution is done for

// needs auth: githubContentUrl = 'https://api.github.com/repos/nodejs/node/contents'
const githubContentUrl = 'https://raw.githubusercontent.com/nodejs/{repo}/{gitref}'
const npmPkgJsonUrl = `${githubContentUrl}/deps/npm/package.json`
to fetch the package.json file for npm.

@richardlau
Copy link
Member Author

richardlau commented Oct 16, 2023

Further evidence, looking at index.json for the rc downloads, most of the version information is either the empty string or null:
e.g.

    {
        "version": "v20.0.0-rc.1",
        "date": "2023-04-13",
        "files": [
            "aix-ppc64",
            "headers",
            "linux-arm64",
            "linux-armv7l",
            "linux-ppc64le",
            "linux-s390x",
            "linux-x64",
            "osx-arm64-tar",
            "osx-x64-pkg",
            "osx-x64-tar",
            "src",
            "win-arm64-7z",
            "win-arm64-zip",
            "win-x64-7z",
            "win-x64-exe",
            "win-x64-msi",
            "win-x64-zip",
            "win-x86-7z",
            "win-x86-exe",
            "win-x86-msi",
            "win-x86-zip"
        ],
        "v8": "",
        "uv": "",
        "zlib": null,
        "openssl": null,
        "modules": null,
        "lts": false,
        "security": false
    },

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

No branches or pull requests

1 participant