question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot pass token to npm script anymore

See original GitHub issue

This started to happen with the recent updates. Until now this was working fine:

// package.json
{
    "scripts": {
        "release": "conventional-github-releaser -t"
    }
}

npm run release -- MY_TOKEN

But I started to get the following error:

C:\...es\conventional-github-releaser\node_modules\meow\node_modules\minimist-options\index.js:101
                                        throw new TypeError(`Expected "${key}" default value to be of type "${expectedType}", got ${prettyPrint(defaultType)}`);
                                        ^

TypeError: Expected "token" default value to be of type "string", got "undefined"
    at C:\node_modules\conventional-github-releaser\node_modules\meow\node_modules\minimist-options\index.js:101:12
    at Array.forEach (<anonymous>)
    at buildOptions (C:\node_modules\conventional-github-releaser\node_modules\meow\node_modules\minimist-options\index.js:64:23)
    at meow (C:\node_modules\conventional-github-releaser\node_modules\meow\index.js:136:18)
    at Object.<anonymous> (C:\node_modules\conventional-github-releaser\src\cli.js:9:13)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

3reactions
Hartorncommented, Aug 24, 2020

We cannot even run in cli conventional-github-releaser --help, it breaks also with the same message

1reaction
thesmiley1commented, Nov 26, 2020

I’m not sure about previous behavior, but I was able to work around the issue by supplying a CONVENTIONAL_GITLAB_RELEASER_TOKEN environment variable, even just a dummy one to get the help working, e.g.:

CONVENTIONAL_GITLAB_RELEASER_TOKEN=asdf conventional-gitlab-releaser --help

Obviously there is still a bug, though: it shouldn’t take a dummy token to print the help documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vsts-npm-auth exists with code 1, the input is not a valid Base ...
I have configured my project to use private Azure DevOps feed through .npmrc file. I have a .js script that does the following:...
Read more >
Creating and viewing access tokens - npm Docs
You can create tokens with read-only permissions or read and publish permissions with the CLI. Note: You cannot create legacy automation tokens or...
Read more >
Securing Node.js RESTful APIs with JSON Web Tokens
The token represents a value that is accessible only by the computer that has access to the secret key with which it was...
Read more >
Authentication API Explorer - Auth0
Send a valid Access Token in the Authorization header, using the Bearer authentication scheme. ... The sample auth0.js script uses the library version...
Read more >
Amazon EKS troubleshooting - AWS Documentation
Make sure that --apiserver-endpoint , --b64-cluster-ca , and --dns-cluster-ip arguments are being passed to the worker node bootstrap script. When including ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found