Skip to content

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
Owner

@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
Owner

@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