Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed resolve root directory #214

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

revinsys
Copy link

The bug was found in nestjs/nest#9504.
When using the Dockerfile and the root directory in it, the script crashed into an infinite loop

@jonaskello
Copy link
Member

@revinsys The issue you are refering to seems to be using 3.9.0. Could you confirm this is a problem with tsconfig-paths 4.0.0? Also adding a test that shows the bug would be great.

@revinsys
Copy link
Author

@jonaskello I checked it on version 4, the error persisted (originally it was version 3.14.1) I attached a code example Above, there is a separate repository branch and if you run it through the Dockerfile, this error will occur.
The only thing is that initially I suggested the wrong solution.
I tried to describe the problem in the test
p.s. I don't know how to write tests, don't kick too much

@revinsys
Copy link
Author

in particular, the function getPathsToTry returns for example //src/main.ts and other that does not match the path, and the resolver module tries to call again and again substituting at the beginning of the path / which leads to an infinite loop

@jonaskello
Copy link
Member

@aleclarson Would you care to review this one?

@n10000k
Copy link

n10000k commented Jan 24, 2023

@jonaskello @aleclarson any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants