Skip to content

Conversation

@jasonlyu123
Copy link
Member

@jasonlyu123 jasonlyu123 commented Jul 1, 2022

#1175. Not 100% sure it's the problem but the error is the same. It also happens in the rollup template that what I get the reproduction.

This one is very tricky to write a test for. So I use a virtual system to write an isolated test. It only happens because of some declaration files that are referenced by the /// <reference type=""> triple-slash directives. And it needs the node_modules to be at the root of the workspace.

What happens is that typescript resolved a module by a relative path to node_module. And try to resolve the absolute path to the module so it can proceed with the auto import. But the provided currentDirectory is an empty string. I changed it to use the target file path to find the nearest workspace root. So we would always have a current directory.

@dummdidumm
Copy link
Member

dummdidumm commented Jul 1, 2022

Did you link the wrong issue? The issue you link to is about emmet completions, not sure how this is related to them - do you mean that message in the stack trace?

@jasonlyu123
Copy link
Member Author

jasonlyu123 commented Jul 1, 2022

Yeah, I mean the error. I guess sometimes it triggers an auto import and errors out. Maybe it's just a coincidence that it happens in his attempts. Let's treat it as unrelated then. But we could ask him if it improves.

@dummdidumm dummdidumm merged commit adf82ab into sveltejs:master Jul 19, 2022
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.

2 participants