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.

Migration Error: "t.getStructure is not a function"

See original GitHub issue

I’ve tested the migration tool on serveral projects and all of them done succesfully. But one of them throw an exception:

/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:14470
            tags: this.getTags().map(t => t.getStructure()),
                                            ^

TypeError: t.getStructure is not a function
    at /*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:14470:45
    at Array.map (<anonymous>)
    at JSDoc.getStructure (/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:14470:34)
    at /*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:8688:59
    at Array.map (<anonymous>)
    at MethodDeclaration.getStructure (/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:8688:40)
    at callBaseGetStructure (/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:534:51)
    at MethodDeclaration.getStructure (/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:8470:20)
    at callBaseGetStructure (/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:534:51)
    at MethodDeclaration.getStructure (/*****/*****/*****/*****/*****/*****/node_modules/ts-morph/dist/ts-morph.js:2771:20)

Thanks for your help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
FFKLcommented, Aug 7, 2020

@NetanelBasal You can close this issue. It’s already fixed in #113. classDeclaration.getStructure() which triggers this error was removed.

1reaction
Lavaeicommented, Aug 5, 2020

@FFKL I’m sorry, i can’t re-run the migration to give you more details about the exception, because my code already migrated. I got the error a few seconds after running the migration. The error only occurred for two or three files. when I exclude them from the project, migration works correctly. I can’t find the difference between those files and the others. Here is a part of one of those files:

  constructor(protected _store: Store<RootState>)
  {
    super();
  }

  protected _getColorsFromSettings()
  {
    this._store.pipe(
      /**
       * Get settings
       */
      select(settingsSelector),

      /**
       * Unsubscribe on destroy
       */
      untilDestroyed(this)
    )
  }

I hope it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Migration Error: "t.getStructure is not a function" -
I've tested the migration tool on serveral projects and all of them done succesfully. But one of them throw an exception:
Read more >
Knex Migration Error .spread() Not a function - Stack Overflow
I have attempted to entirely remove all things NPM from my machine before reinstalling. When I uninstall Knex, Knex CLI still remains. I...
Read more >
Analyze Bot Scanner report for migration
This attribute is always true for error type messages, which indicates that migration of that command to Automation 360 is not yet supported....
Read more >
TypeError: migrations.setCompleted is not a function ...
I'm learning and it's the first time I'm deploying so I'm not sure how to fix the error. Thank you for your help!...
Read more >
SAP BW/4HANA write interface-enabled ADSO connected to a ...
If the sent data is not correct, it is possible to close the request and mark it as Error. Use the CLOSE-Request-URL with...
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