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.

10.0.0 - TypeError: this.name is not a function

See original GitHub issue

Im getting the following error since the new version. The command worked in previous release: Im running the command npx swagger-typescript-api -p filename.json -n outfile

/home/vsts/.npm/_npx/ad2f6472e51cc62f/node_modules/commander/lib/command.js:1258
    const commandEvent = `command:${this.name()}`;
                                         ^

TypeError: this.name is not a function
    at Command._parseCommand (/home/vsts/.npm/_npx/ad2f6472e51cc62f/node_modules/commander/lib/command.js:1258:42)
    at Command.parse (/home/vsts/.npm/_npx/ad2f6472e51cc62f/node_modules/commander/lib/command.js:891:10)
    at Object.<anonymous> (/home/vsts/.npm/_npx/ad2f6472e51cc62f/node_modules/swagger-typescript-api/index.js:73:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
js2mecommented, Aug 15, 2022

fixed in 10.0.1

0reactions
js2mecommented, Aug 15, 2022

Seems that this problem based on closed issue in commander https://github.com/tj/commander.js/issues/1282

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: this.name is not a function - Stack Overflow
In the below code I always get an error "TypeError: this.verifyUrl is not a function at Server.ImageServer.handleRequest" even though the ...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
this.name is not a function when a subcommand with option ...
Commander in version 5.1.0 seems to have problems with option called name in subcommand this typescript command snippet works: program ...
Read more >
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
A typographical error in a function call. · Missing script library. · When a function is called on a property that is not...
Read more >
Changelog - Cypress Documentation
Fixed a regression introduced in the Electron browser in Cypress 10.8.0 where the CYPRESS_EVERY_NTH_FRAME environment variable was not being set ...
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