Always prompt [ Must provide a command ], no matter how I call the command
See original GitHub issue1.My environment:
Windows10
WebStorm2020.2.2
npm 6.13.4
node.js 12.16.1
ts-migrate 0.1.6
2.Error report & log
Administrator@TIONGEDESKTOP MINGW64 /d/Program_Files/JetBrains_ToolBox/projects/WebStorm/use-on-demand (master)
$ ts-migrate -- init aaa
Usage: npm run ts-migrate -- <command> [options]
Commands:
npm run ts-migrate -- init <folder> Initialize tsconfig.json file in
<folder>
npm run ts-migrate -- init:extended Initialize tsconfig.json file in
<folder> <folder>
npm run ts-migrate -- rename <folder> Rename files in folder from JS/JSX
to TS/TSX
npm run ts-migrate -- migrate <folder> Fix TypeScript errors, using
codemods
npm run ts-migrate -- reignore <folder> Re-run ts-ignore on a project
Options:
-h, --help Show help [boolean]
Examples:
npm run ts-migrate -- --help Show help
npm run ts-migrate -- init frontend/foo Create tsconfig.json file at
frontend/foo/tsconfig.json
npm run ts-migrate -- init:extended Create extended from the base
frontend/foo tsconfig.json file at
frontend/foo/tsconfig.json
npm run ts-migrate -- rename Rename files in frontend/foo from
frontend/foo JS/JSX to TS/TSX
Must provide a command.
3.Other Info
$ npm run ts-migrate -- migrate "./"
npm ERR! missing script: ts-migrate
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-09-28T03_56_16_853Z-debug.log
I did not manually add the [ts-migrate] script, because the [Repo Document] did not say to do so.
4._
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Bash ignoring error for a particular command - Stack Overflow
I have ~100 lines of script executing and I don't want to check return code of every line in the script. But for...
Read more >UNIX Commands - E 115: Introduction to Computing ...
A command prompt is essentially as it sounds, the computer is prompting the user for command input.
Read more >Bash - how to run a command after the previous finished?
I want to execute the commands one by one, when the previous finishes. Am I doing it in the right way? I've never...
Read more >Command Line for Beginners – How to Use the Terminal Like ...
Hi everyone! In this article we'll take a good look at the command line (also known as the CLI, console, terminal or shell)....
Read more >Command-line syntax overview for System.CommandLine
The [suggest] directive lets you search for commands when you don't know the exact command. .NET CLI Copy. dotnet [ ...
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
The help displayed by
ts-config
is terrible and misleading.Obviously, running
npm run ts-migrate
won’t work also-- init <folder>
or-- migrate <folder>
suggests you must include two dash signs and space 😕 That’s not going to work either.Solution: Use
npx ts-migrate init <folder>
ornpx ts-migrate migrate <folder>
, i.e. general format is:ts-migrate <command> <args>
where thecommand
isinit
,rename
,migrate
etc.Please update help displayed!
I was having an issue with running
ts-migrate
vianpx
like so:npx ts-migrate -- rename .
, like it is documented in Github, but turns out--
is what was breaking for me. The above commands without--
worked for me.