mulesoft-labs / api-console-cli

A CLI tools for the API console.
Other
14 stars 15 forks source link

Cannot read property 'tag_name' of undefined (version 1.0.0) #28

Closed postatum closed 4 years ago

postatum commented 6 years ago

Hi. I get an error when trying to use the CLI version 1.0.0. Previous version doesn't give this error.

sudo npm install -g api-console-cli
wget -O api.raml https://raw.githubusercontent.com/raml-org/raml-examples/master/helloworld/helloworld.raml
api-console build ./api.raml

(node:26296) ExperimentalWarning: The fs.promises API is experimental
error:  
error: Cannot read property 'tag_name' of undefined
error: TypeError: Cannot read property 'tag_name' of undefined
    at ApiConsoleSources._downloadFromReleaseInfo (/usr/lib/node_modules/api-console-cli/node_modules/api-console-sources-resolver/lib/api-console-sources.js:172:29)
    at githubResolver.getLatestInfo.then (/usr/lib/node_modules/api-console-cli/node_modules/api-console-sources-resolver/lib/api-console-sources.js:141:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
error:
mduesterhoeft commented 6 years ago

Same here

api-console build -a api.raml -t "RAML 1.0"
error: Cannot read property 'tag_name' of undefined
error: TypeError: Cannot read property 'tag_name' of undefined
    at ApiConsoleSources._downloadFromReleaseInfo (/usr/local/lib/node_modules/api-console-cli/node_modules/api-console-sources-resolver/lib/api-console-sources.js:172:29)
    at githubResolver.getLatestInfo.then (/usr/local/lib/node_modules/api-console-cli/node_modules/api-console-sources-resolver/lib/api-console-sources.js:141:26)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
mduesterhoeft commented 6 years ago

The documentation mentions a tag name parameter

-n, --tag-name
Type: String

Release tag name to use to build the console. To be used to build specific release of the console. Only versions >= 5.0.0.

This seems to work:

api-console build -a api.raml -t "RAML 1.0" -n "5.0.0-preview"
jarrodek commented 6 years ago

Stable version of the cli tool only works with API console version 5. However this version is not yet published. It was scheduled but it's delayed now as we are resolving some additional issues.

Please downgrade to version 0.2.12 for previous set of configuration options.

goodevilgenius commented 5 years ago

@jarrodek To be clear, the stable version of the cli, only works with an unstable version of api-console? So, we have to tell it to fetch an unstable version for it to work?

jarrodek commented 5 years ago

It is my fault. The console supposed to be released some time ago but because some internal changes in our scheduler I have to stop the release. I was able to release the next version of the builder already but had to stop with the console. I should have remove the release from npm since the console isn't yet ready.

brennebeck commented 5 years ago

@jarrodek this still isn't resolved it appears? Is the accepted work-around to install the previous release of the cli?

jarrodek commented 5 years ago

Current walkaround is mto use the following command:

$ api-console build -n "5.0.0-preview-1" -t "RAML 1.0"  -a api.raml

5.0.0-preview-1 because that's the only currently tag related to 5.0.0 version (there is no 5.0.0-preview tag). Soon it will change to the command described in docs as soon as API console is released.