0

I have a project in nestJs, but I do a simple change that add a console.log('') and not start.

For start project I use: yarn start:dev

But project stay in:

[Nest] 1772  - 23/03/2023, 7:55:13     LOG [InstanceLoader] PassportModule dependencies initialized +0ms
[Nest] 1772  - 23/03/2023, 7:55:13     LOG [InstanceLoader] CommonModule dependencies initialized +1ms
[Nest] 1772  - 23/03/2023, 7:55:13     LOG [InstanceLoader] ConfigHostModule dependencies initialized +1ms
[Nest] 1772  - 23/03/2023, 7:55:13     LOG [InstanceLoader] JwtModule dependencies initialized +1ms
[Nest] 1772  - 23/03/2023, 7:55:13     LOG [InstanceLoader] EmailModule dependencies initialized +1ms
[Nest] 1772  - 23/03/2023, 7:55:13     LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
philip Gue
  • 25
  • 4
  • are you using windows? please run `npm ls typescript` – Micael Levi Mar 23 '23 at 13:45
  • yes I use windows, I run `npm ls typescript`, but stay in ConfigModule dependencies initialized, please what commands I need to run – philip Gue Mar 29 '23 at 13:45
  • run `npm ls typescript` and share us the exact typescript version you're using – Micael Levi Mar 29 '23 at 13:46
  • npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. ja@1.21.204 C:\ ├─┬ @nestjs/cli@9.3.0 │ ├─┬ fork-ts-checker-webpack-plugin@8.0.0 │ │ └── typescript@4.9.5 deduped │ └── typescript@4.9.5 deduped ├─┬ @nestjs/schematics@9.0.4 │ └── typescript@4.9.5 deduped ├─┬ @typescript-eslint/eslint-plugin@5.56.0 │ └─┬ tsutils@3.21.0 │ └── typescript@4.9.5 deduped ├─┬ ts-jest@29.0.0 │ └── typescript@4.9.5 deduped ├─┬ ts-loader@9.4.2 │ └── typescript@4.9.5 deduped ├─┬ ts-node@10.9.1 │ └── typescript@4.9.5 deduped └── typescript@4.9.5 – philip Gue Mar 30 '23 at 00:11
  • ok, so it's typescript 4.9. You could downgrade it to 4.8 or try this out: https://docs.nestjs.com/faq/common-errors#file-change-detected-loops-endlessly – Micael Levi Mar 30 '23 at 12:23

1 Answers1

0

verify yours.json file

    "scripts": {
    "build": "nest build",
    "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
    "start": "nest start",
    "start:dev": "nest start --watch",
    "start:debug": "nest start --debug --watch",
    "start:prod": "node dist/main",
    "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },

must check the

"start:dev": "nest start --watch"