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.

Not picking up files to migrate

See original GitHub issue

Hi there, I think this is an operator error situation but I’m going to explain what I’m trying to do and hopefully someone can call out where I’m going wrong.

Currently have a very large codebase and I’m trying to migrate each folder in the codebase one at a time to sanely manage the migration.

So I have a folder called lib/src/constants/ that contains the following files:

lib/src/constants
├── __mocks__
│   └── helpers.ts
├── apps.ts
├── helpers.ts
└── types.ts

Commands I’m running:

Step 1

yarn run ts-migrate init:extended lib/src/constants

This generates a boilerplate tsconfig.json within lib/src/constants. 👍🏽

Step 2 Replace tsconfig.json contents to point to the tsconfig.json that lives at the root of all the folders.

{
  "extends": "../../../tsconfig.json",
  "include": ["."]
}

Step 3

yarn run ts-migrate migrate lib/src/constants

Run the command above and get the output below.

TypeScript version: 4.1.2
Initialized tsserver project in 1649.462ms.
Start...
[strip-ts-ignore] Plugin 1 of 14. Start...
[strip-ts-ignore] Finished in 19.194ms.
[hoist-class-statics] Plugin 2 of 14. Start...
[hoist-class-statics] Finished in 1.508ms.
[react-props] Plugin 3 of 14. Start...
[react-props] Finished in 0.287ms.
[react-class-state] Plugin 4 of 14. Start...
[react-class-state] Finished in 0.265ms.
[react-class-lifecycle-methods] Plugin 5 of 14. Start...
[react-class-lifecycle-methods] Finished in 0.216ms.
[react-default-props] Plugin 6 of 14. Start...
[react-default-props] Finished in 0.618ms.
[react-shape] Plugin 7 of 14. Start...
[react-shape] Finished in 0.490ms.
[declare-missing-class-properties] Plugin 8 of 14. Start...
[declare-missing-class-properties] Finished in 647.272ms.
[member-accessibility] Plugin 9 of 14. Start...
[member-accessibility] Finished in 1.314ms.
[explicit-any] Plugin 10 of 14. Start...
[explicit-any] Finished in 28.786ms.
[add-conversions] Plugin 11 of 14. Start...
[add-conversions] Finished in 2.923ms.
[eslint-fix] Plugin 12 of 14. Start...
[eslint-fix] Finished in 2680.290ms.
[ts-ignore] Plugin 13 of 14. Start...
[ts-ignore] Finished in 0.755ms.
[eslint-fix] Plugin 14 of 14. Start...
[eslint-fix] Finished in 105.843ms.
Finished in 3490.653ms, for 14 plugin(s).
Writing 0 updated file(s)...
Wrote 0 updated file(s) in 0.041ms.

Says it wrote 0 updated files. 😿

Then I opened up one of the files to see if it removed the // @ts-ignore that was at the top but nothing has changed.

I’m currently trying to understand what files it’s picking up and how to tell it what files to include. I thought tsconfig.json was doing that but appears to not be the case.

Any help here would be greatly appreciated. Otherwise I’ll keep digging in the source code trying to figure what I’m doing wrong.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
protoEvangelioncommented, May 20, 2021

I ran into this as well but it was because I was running the plugins on .js files before they were renamed to .ts files.

1reaction
johnstewcommented, Jan 6, 2021

Okay, turns out this was operator error. As I suspected. I forgot to remove the // @ts-nocheck from the top of the files. 🤦🏽

Sorry about this. I’ll close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration Assistant Not Working? Try These 10 Fixes
Here are some of the reasons for Migration Assistant not working on your Mac computers:
Read more >
Guide to Fixing Migration Assistant Not Working on Mac 2022
A roundup of errors causing Migration Assistant not working on Mac and solutions to common Apple Migration Assistant problems.
Read more >
Missing files after using Migration Assistant
I found the Library folder. I just can't figure out what to do since Migration Assistant did not transfer major files. Do I...
Read more >
Troubleshooting Migration Manager - Microsoft 365
All files and folders in the Migration Manager working folder, %appdata%\Microsoft\SPMigration\Logs\Migration\MigrationToolStorage, must be ...
Read more >
Migration Assistant Not Working [Troubleshoot Mac Issues Now]
Mac Migration Assistant Not At All Working Over WIFI? 1. Check your old Mac's Firewall. 2. Use the Same Apple id. 3. Start...
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