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

TypeError: Cannot read property 'replace' of undefined #191

Open
bechir opened this issue Oct 31, 2020 · 2 comments
Open

TypeError: Cannot read property 'replace' of undefined #191

bechir opened this issue Oct 31, 2020 · 2 comments

Comments

@bechir
Copy link

bechir commented Oct 31, 2020

Hi,
I'm working on conventional-github-releaser 3.1.5, and i have the following error:

TypeError: Cannot read property 'replace' of undefined at ghGot (/path/to/project/node_modules/gh-got/index.js:32:58)

In my gulp configuration:

function githubRelease(done) {
    conventionalGithubReleaser({
            type: 'oauth',
            token: process.env.GH_TOKEN
        }, {
            preset: 'angular'
        },
        done
    );
}

exports.release = series(
    // ...
    githubRelease
);

Possible solution
Update gh-got to ^9.0.0 ?

@emptypockets-dev
Copy link

I have the same problem. Any luck with a solution?

@adotland
Copy link

adotland commented May 5, 2021

your opts object above is missing a value for the endpoint key, which is actually named 'url'

{url: 'https://api.github.com/'}

When not passed in, gh-got will check for it in your .env file, but this is irrelevant because it is overwritten by what you passed in earlier, which is undefined.

https://github.com/sindresorhus/gh-got/blob/a73bca816c09e7655f5f2496e0c4be4e6d204b09/index.js#L12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants