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 read property 'length' of undefined. api_blueprint to swagger_2

See original GitHub issue

Im getting the following error while trying to convert from api_blueprint to swagger_2 Fatal TypeError: Cannot read property 'length' of undefined at jsonSchemaFromMSON (/usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:217:37) at /usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:38:67 at Array.forEach (<anonymous>) at /usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:31:26 at Array.forEach (<anonymous>) at Object.module.exports.convertParsed (/usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:28:8) at converters.swagger_2.Promise.method.apibp (/usr/local/lib/node_modules/api-spec-converter/lib/formats/api_blueprint.js:16:24) at tryCatcher (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/util.js:16:23) at /usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/method.js:15:34 at Promise.try (/usr/local/lib/node_modules/api-spec-converter/lib/base_format.js:162:12) at tryCatcher (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/util.js:16:23) at Function.Promise.attempt.Promise.try (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/method.js:39:29) at module.exports.BaseFormat.convertTo (/usr/local/lib/node_modules/api-spec-converter/lib/base_format.js:154:21) at Converter.getSpec.then.fromSpec (/usr/local/lib/node_modules/api-spec-converter/index.js:33:32) at tryCatcher (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/promise.js:512:31)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dobromir-bogatevcommented, Sep 28, 2017

Sorry, the repository is not public as i thought.

Here is a gist:

https://gist.github.com/dobromir-bogatev/7ab8de885c1433764ba575dc9cf64a2b

0reactions
rbrencommented, Oct 27, 2017

Thanks for following up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'length' of undefined · Issue #7
I'm getting this error: $ fetch-swagger-schema http://petstore.swagger.io/v2/swagger.json petstore.json [TypeError: Cannot read property ...
Read more >
json api and result with error: Cannot read property 'length' of ...
When i run the code it tells me "Uncaught TypeError: Cannot read property 'length' of undefined". With a lot of search and reading...
Read more >
Typeerror: Cannot Read Property 'length' of Undefined
The length property returns a number for essentially any object in JavaScript. Typeerrors can be thrown when attempting to change a value that...
Read more >
Task processing fails with error Cannot read property length
TypeError: Cannot read property 'length' of undefined. It looks like the files all process until the end of the video then fail.
Read more >
Swagger UI -- Uncaught TypeError: Cannot read property ...
Uncaught TypeError: Cannot read property 'length' of undefined. The error is thrown because "response.apis" is null. As the apis are defined ...
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