admin管理员组文章数量:1287882
When I start the nest application, then it successfully starts and shows the logs given below.
I've used mand npm run dev:start
to start the project.
[11:55:17 AM] File change detected. Starting incremental pilation...
[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 repiled and in console it displays
[12:06:59 PM] File change detected. Starting incremental pilation...
and it doesn't show the log messages. How can I fix this?
When I start the nest application, then it successfully starts and shows the logs given below.
I've used mand npm run dev:start
to start the project.
[11:55:17 AM] File change detected. Starting incremental pilation...
[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 repiled and in console it displays
[12:06:59 PM] File change detected. Starting incremental pilation...
and it doesn't show the log messages. How can I fix this?
Share Improve this question edited May 21, 2021 at 2:01 Sai Gummaluri 1,40410 silver badges17 bronze badges asked May 19, 2021 at 6:28 Prasanga ThapaliyaPrasanga Thapaliya 7371 gold badge10 silver badges24 bronze badges 1- problably because you are writing to some file that TSC is watching. To solve this stackoverflow./questions/59211211 – Micael Levi Commented May 19, 2021 at 13:17
5 Answers
Reset to default 3Add to your tsconfig.json
:
"include": [
"src"
]
If the above doesn't work, here is how i fixed the issue
This is something related with your OS (Windows 11 in my case) and ts 4.9
Try it out with typescript 4.8 instead, in the package.json include
"devDependencies": {
...,
"typescript": "4.8.3",
...
}
later
npm i
npm run start:dev
This might help you: https://devblogs.microsoft./typescript/announcing-typescript-4-9/#file-watching-changes
As mentioned in NestJs Documentation in Windows operating system for Typescript version 9+ we need to add following after pilerOptions in tsconfig file:
"watchOptions": { "watchFile": "fixedPollingInterval" }
if the above doesn't work, here is how i fixed the issue
for NestJS
inside the : tsconfig.build.json file
Add "include": ["./src"]
Looks like this
tsconfig.build.json
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"],
"include": ["./src"]
}
i don't know which dependency caused the issue in my case. but for me it just worked after i ran:
npm audit fix
本文标签:
版权声明:本文标题:javascript - Logs in the console stuck saying [12:06:59 PM] File change detected. Starting incremental compilation in nestjs - S 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741332388a2372840.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论