`nest start` ignores exclude folders from tsconfig
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current behavior
nest start
tries to compile files it shouldn’t - including *.d.ts definitions from node_modules
. As the result trying to run nest with nest start
results in over 1’000 errors while tsc compiles w/o any errors. The issue remains with any nest project on my machine, even a new one created using nest cli tool.
Minimum reproduction code
https://github.com/Shassk/test-nest-app
Steps to reproduce
- Take a nest app (in case of this example I’ve used a new one created with
node path-to-nest\nest.js -- n test-nest-app
) yarn install
yarn start
Expected behavior
nest start
follows tsconfig rules and excludes node_modules
from compiling.
Package
- I don’t know. Or some 3rd-party package
-
@nestjs/common
-
@nestjs/core
-
@nestjs/microservices
-
@nestjs/platform-express
-
@nestjs/platform-fastify
-
@nestjs/platform-socket.io
-
@nestjs/platform-ws
-
@nestjs/testing
-
@nestjs/websockets
- Other (see below)
Other package
No response
NestJS version
8.0.0
Packages versions
{
// . . .
"dependencies": {
"@nestjs/common": "^8.0.0",
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0"
},
"devDependencies": {
"@nestjs/cli": "^8.0.0",
"@nestjs/schematics": "^8.0.0",
"@nestjs/testing": "^8.0.0",
"@types/express": "^4.17.13",
"@types/jest": "27.5.0",
"@types/node": "^16.0.0",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "28.0.3",
"prettier": "^2.3.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "28.0.1",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "4.0.0",
"typescript": "^4.3.5"
},
```
### Node.js version
16.14.0
### In which operating systems have you tested?
- [ ] macOS
- [X] Windows
- [ ] Linux
### Other
The issue persisted on 8.4.6 as well.
Also unlikely, but still possibly related: I have my projects on an exFAT MicroSD (E:\) with a symlink in `C:\...\Documents` pointing at the projects folder on E:\. Although I've tried to run `nest start` from both the actual location and the symlink path - the result doesn't change. So I doubt that's the reason.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
NestJS - exclude folder under watch mode - Stack Overflow
But under npm run start:dev mode, every time I upload a file, Nest has detected file change and restarts server. How can I...
Read more >Exclude a Folder from compilation with tsconfig.json in TS
Use the exclude option in your tsconfig.json file to exclude a folder from compilation in TypeScript. The exclude option changes what the include...
Read more >TSConfig Option: rootDir - TypeScript
When TypeScript compiles files, it keeps the same directory structure in the output directory as exists in the input directory. For example, let's...
Read more >Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >tsconfig exclude folder - Code Examples & Solutions For This ...
Contributions From The Grepper Developer Community. Contents. Code Examples. exclude folder from typescript compiler tsconfig.json. Related Problems.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Nope, turns out we changed that at some point and I missed it. It’ll run the compiler either way
The
git@github.com:Shassk
part didn’t want to work, so I’ll usehttps://github.com/Shassk
instead. Hope that won’t be a problem? Install will take some time, my internet isn’t particularly fast.