Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logs in the console stuck saying [12:06:59 PM] File change detected. Starting incremental compilation in nestjs

When I start the nest application, then it successfully starts and shows the logs given below.

I've used command npm run dev:start to start the project.

[11:55:17 AM] File change detected. Starting incremental compilation...

[11:55:17 AM] Found 0 errors. Watching for file changes.

[Nest] 23860   - 05/19/2021, 11:55:18 AM   [NestFactory] Starting Nest application...
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [InstanceLoader] AppModule dependencies initialized +106ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [InstanceLoader] TypeOrmModule dependencies initialized +1ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [InstanceLoader] TypeOrmCoreModule dependencies initialized +24ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [RouterExplorer] Mapped {/auth/signup, POST} route +2ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [RoutesResolver] PostController {/post}: +1ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [RouterExplorer] Mapped {/post/create, POST} route +0ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [RouterExplorer] Mapped {/post, GET} route +1ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [RoutesResolver] CategoryController {/category}: +0ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [RouterExplorer] Mapped {/category/create, POST} route +0ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [NestApplication] Nest application successfully started +2ms
[Nest] 23860   - 05/19/2021, 11:55:18 AM   [bootstrap] Application started at localhost:5001

Now if I send any request to the end points, it successfully sends the request and data get stored in the database and also returns the data but the problem is code gets recompiled and in console it displays

[12:06:59 PM] File change detected. Starting incremental compilation...

and it doesn't show the log messages. How can I fix this?

like image 793
Prasanga Thapaliya Avatar asked Oct 19 '25 13:10

Prasanga Thapaliya


2 Answers

Add to your tsconfig.json:

"include": [
    "src"
]
like image 60
bujhmt Avatar answered Oct 22 '25 04:10

bujhmt


As mentioned in NestJs Documentation in Windows operating system for Typescript version 9+ we need to add following after compilerOptions in tsconfig file:

"watchOptions": { "watchFile": "fixedPollingInterval" }

like image 27
Hamid Mir Avatar answered Oct 22 '25 02:10

Hamid Mir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!