releaser-tools icon indicating copy to clipboard operation
releaser-tools copied to clipboard

Minimist parsing error

Open tylergets opened this issue 4 years ago • 6 comments

Seeing a random error on our deployments, will continue to dig deeper.

					throw new TypeError(`Expected "${key}" default value to be of type "${expectedType}", got ${prettyPrint(defaultType)}`);
					^

TypeError: Expected "verbose" default value to be of type "boolean", got "string"
    at /usr/local/lib/node_modules/conventional-github-releaser/node_modules/minimist-options/index.js:101:12
    at Array.forEach (<anonymous>)
    at buildOptions (/usr/local/lib/node_modules/conventional-github-releaser/node_modules/minimist-options/index.js:64:23)
    at meow (/usr/local/lib/node_modules/conventional-github-releaser/node_modules/meow/index.js:136:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/conventional-github-releaser/src/cli.js:9:13)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
##[error]Process completed with exit code 1.```

tylergets avatar Jun 25 '20 15:06 tylergets

We are having the same issue? Any new information about this?

csakbalint avatar Jun 26 '20 09:06 csakbalint

The latest patch (4.0.2) of conventional-gitlab-releaser breaks the release process. I fixed the version to the previous one.

csakbalint avatar Jun 26 '20 09:06 csakbalint

The specific error on this is in the usage help verbose definition in the src/cli.js:

    verbose: {
      alias: 'v',
      default: 'false',
      type: 'boolean'
    },

should be

    verbose: {
      alias: 'v',
      default: false,
      type: 'boolean'
    },

jimlindeman avatar Jun 26 '20 13:06 jimlindeman

Please patch this asap, as those fetching latest of this package are broken and will have to hardlink to 3.1.3.

jimlindeman avatar Jun 26 '20 13:06 jimlindeman

This is actually a long standing bug, but only exposed as a problem with the update to newer 'meow' package as part of https://www.npmjs.com/package/conventional-gitlab-releaser/v/4.0.2 , which started type-checking the default value passed in.

jimlindeman avatar Jun 26 '20 18:06 jimlindeman

PR for fix for this: https://github.com/conventional-changelog/releaser-tools/pull/185

jimlindeman avatar Jun 26 '20 18:06 jimlindeman