NestJs中的npm run start:dev在我对代码进行一些更改时不重建

问题描述 投票:0回答:2

当我在NestJs中运行npm run start:dev时,它的工作方式是这样的:

10:00:00 AM - Starting compilation in watch mode...

10:00:10 AM - Found 0 errors. Watching for file changes.
Debugger listening on ws://127.0.0.1:9229/0cb76900-3b46-4f68-82c0-ea78ed36f327
For help, see: https://nodejs.org/en/docs/inspector
[Nest] 3932   - 03/06/2020, 10:00:23 AM   [NestFactory] Starting Nest application...
[Nest] 3932   - 03/06/2020, 10:00:23 AM   [InstanceLoader] JwtModule dependencies initialized +41ms
[Nest] 3932   - 03/06/2020, 10:00:23 AM   [InstanceLoader] ConfigHostModule dependencies initialized +2ms
[Nest] 3932   - 03/06/2020, 10:00:23 AM   [InstanceLoader] ConfigModule dependencies initialized +2ms

enter image description here

但是当我更改代码时,它没有被重建。它就像这样显示:

10:40:27 AM - File change detected. Starting incremental compilation...

10:40:27 AM - Found 0 errors. Watching for file changes.

enter image description here

有人可以帮我修复它吗?非常感谢。

npm nestjs
2个回答
0
投票
to

const app = await NestFactory.create(AppModule);

希望有帮助!

0
投票
© www.soinside.com 2019 - 2024. All rights reserved.