[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
I'm trying to build monorepo from trilon.io/blog, but seem my nest-cli cannot build or start the monorepo with app and lib as shown in the images below. The path seems duplicate here: apps\webservice\apps\webservice\src\main.ts
ERROR in Entry module not found: Error: Can't resolve 'D:\Learning\nest-cli-test\apps\webservice\apps\webservice\src\main.ts' in 'D:\Learning\nest-cli-test'


[System Information]
OS Version : Windows 10
NodeJS Version : v10.16.3
YARN Version : 1.17.3
[Nest Information]
platform-express version : 6.7.2
common version : 6.7.2
core version : 6.7.2
What is your CLI version?
@kamilmysliwiec CLI version 6.9.1
Can you share the reproduction repository?
@kamilmysliwiec here is it https://github.com/Dominic-Preap/nest-cli-test
I can't reproduce your issue. What command did you run? What's your current directory?
Let's start again on my machine:
nest new my-app, using yarn and wait until finishcd my-appnest g app webservicenest g lib confignest start webservice and got error

@johnbiundo could you try to reproduce this issue on Windows?
Happens the same to me, exact repro steps, only using npm.
I can make it to run replacing the "sourceRoot" property value in the nest-cli.json file back to "src" and start the project with npm run start:dev... it doesn't work with the nest start command directly
We've reproduced this on Windows. @kamilmysliwiec is working to push a fix ASAP. Thanks for reporting!
Fix has just been published in the latest version cc @filipevelhucopereira @Dominic-Preap
It's working! cc @kamilmysliwiec @Dominic-Preap
It's also working for me. Thanks everyone. cc @kamilmysliwiec @johnbiundo @filipevelhucopereira
my observation is a little different when you add class-validator as a dependency to the project following file starts throwing the error
node_modules/class-validator/decorator/decorators.d.ts:161:45
and the error is
error TS2503: Cannot find namespace 'ValidatorJS'.
a solution to this problem is to add following configuration in tsconfig.json file
"include": [
"custom-typings"
],
but then nest build commands start complaining and don't give any output (doesn't generate dist folder) nest run start:dev behaves the same way.
So my temporary solution is:
Step 1: Remove include section from tsconfig.json file and then build your project.
You will start seeing ValidatorJs errors on screen
Step 2: ctrl + c
Step 3: Now put back the configuration in tsconfig.json file.
Step 4: npm run start || npm run start:dev
Everyone is happy.
cc @kamilmysliwiec required a permanent solution on this. I will try to create reproduction repository.
@kedar9444 I also encountered this problem, I found the solution in the class-validator repository issue: setting "skipLibCheck": true in compilerOptions worked for me.
this is the link to the issue
Most helpful comment
It's working! cc @kamilmysliwiec @Dominic-Preap