Cannot run tsoa when installed globally
See original GitHub issuenpm install -g tsoa
tsoa --help
module.js:442
throw err;
^
Error: Cannot find module 'C:\Users\dave\AppData\Roaming\npm/package.json'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at getPackageJsonValue (C:\Users\dave\AppData\Roaming\npm\node_modules\tsoa\dist\cli.js:107:25)
at Object.<anonymous> (C:\Users\dave\AppData\Roaming\npm\node_modules\tsoa\dist\cli.js:33:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.runMain (module.js:575:10)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
at bootstrap_node.js:467:3
Doesn’t work.
vs
npm install tsoa
node ./node_modules/tsoa/dist/cli.js --help
Usage: node_modules\tsoa\dist\cli.js <command> [options]
Commands:
swagger Generate swagger spec
routes Generate routes
Options:
--help, -h Show help [boolean]
Works.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
tsoa - npm
Start using tsoa in your project by running `npm i tsoa`. There are 129 other projects in the npm registry using tsoa.
Read more >'tsc command not found' in compiling typescript - Stack Overflow
Globally installing TypeScript package worked for me. npm install typescript -g.
Read more >Getting started | tsoa - GitHub Pages
Configuring tsoa and typescript; Defining our first model; Defining a simple controller; Creating our express server; Building the routes file; What's next?
Read more >David Aktary – TypeScript and Tsoa as a Source of Truth
Tsoa is a simple command-line tool you can insert in your compile-time workflow. ... Your browser can't play this video.
Read more >How to Install a Node.js Application
js, cPanel Technical Support can't help you with these steps. We recommend that only experienced system administrators perform these steps. We ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! Maybe it could check the PWD that the command was ran from? Then it could still find the local package.json.
I think that’s a pretty good idea, I’ll most likely implement that.