kiota: Bug TypeScript: Runtime error when executing generated code for Graph API

Steps to reproduce:

  1. Generate request builders for Graph v1.0.
  2. Use the generated code to create a request.
  3. Build and run the request

Expected: Result from Graph API.

Actual:

\lib\models\microsoft\graph\listItem.js:11
class ListItem extends baseItem_1.BaseItem {
TypeError: Class extends value undefined is not a constructor or null

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (24 by maintainers)

Most upvoted comments

#1275 this is the new minor error.

With changes in #1274 and #1275 I was able to run the code for the entire API successfully 😃

investigate whether changing the module types, the ES targets, adding barrels, testing on different JS engines makes any difference, so we have a better understanding of the root cause. I believe @nikithauc is already doing some of that at the moment

The circular issue exists with ES modules too. I had tested CJS and ES at the time I faced this issue. Sorry I should have mentioned this earlier.

What I am currently working on is generating index.ts (which is also related to #938 ). The exports in the index file should be ordered based on the order of inheritance.

I was able to get through this error with some manual modifications 😃 but now I am facing a new error 😦 . Investigating this !