Search code examples
javascriptnode.jsbackendnestjs

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?


Solution

  • Add to your tsconfig.json:

    "include": [
        "src"
    ]