You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I kept getting a failed to load config error on an old, archived repo. This repo was nested within a parent directory named old?, whose question mark turned out to be the cause of the error. Only problem is the error is not descriptive, even though a parent directory of old# does alert you that a hash might cause issues.
Renaming the parent directory is an easy fix, and so having a clear error/warning logged suggesting so would help add to an even better dev experience.
I only found three characters that caused that kind of behaviour: ?*\
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
But seems like for ? the error happened while loading the config, which is too early as we only check the # and ? after the config is loaded. It's strange that # worked for the config, and not ? though. It would be good to check what's causing this.
Otherwise as a last resort we may have to move the bad chars check earlier, at the expense of disregarding the logLevel set in the Vite config.
Describe the bug
I kept getting a
failed to load config
error on an old, archived repo. This repo was nested within a parent directory namedold?
, whose question mark turned out to be the cause of the error. Only problem is the error is not descriptive, even though a parent directory ofold#
does alert you that a hash might cause issues.Renaming the parent directory is an easy fix, and so having a clear error/warning logged suggesting so would help add to an even better dev experience.
I only found three characters that caused that kind of behaviour:
?*\
Reproduction
https://github.com/zisiszak/vite-inconsistent-resolution-error-logging
Steps to reproduce
cd old\?
pnpm install
(or whatever suits)pnpm test
(shortcut forpnpm exec vite
)From there,
cd
into theold#
dir and repeat for an example of expected behaviour.System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: