JetBrains/intellij-community · error · ConfigurationException
Enter {0} file location
Error message
Enter {0} file location What it means
Thrown by ProjectNameStep.validate() when the project file directory field is empty. The step needs a location to run ProjectWizardUtil.createDirectoryIfNotExists and to compute the .ipr or .idea path, so empty location aborts validation.
Source
Thrown at java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java:112
myWizardContext.setProjectFileDirectory(getProjectFileDirectory());
}
@Override
public Icon getIcon() {
return myWizardContext.getStepIcon();
}
@Override
public boolean validate() throws ConfigurationException {
String name = myNamePathComponent.getNameValue();
if (name.isEmpty()) {
ApplicationNamesInfo info = ApplicationNamesInfo.getInstance();
throw new ConfigurationException(JavaUiBundle.message("prompt.new.project.file.name", info.getFullProductName(), myWizardContext.getPresentationName()));
}
final String projectFileDirectory = getProjectFileDirectory();
if (projectFileDirectory.isEmpty()) {
throw new ConfigurationException(JavaUiBundle.message("prompt.enter.project.file.location", myWizardContext.getPresentationName()));
}
final boolean shouldPromptCreation = myNamePathComponent.isPathChangedByUser();
String prefix = JavaUiBundle.message("directory.project.file.directory", myWizardContext.getPresentationName());
if (!ProjectWizardUtil.createDirectoryIfNotExists(prefix, projectFileDirectory, shouldPromptCreation)) {
return false;
}
boolean shouldContinue = true;
final String path = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED
? getProjectFileDirectory() + "/" + Project.DIRECTORY_STORE_FOLDER : getProjectFilePath();
final File projectFile = new File(path);
if (projectFile.exists()) {
final String title = myWizardContext.isCreatingNewProject()
? IdeCoreBundle.message("title.new.project")
: IdeCoreBundle.message("title.add.module");
final String message = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASEDView on GitHub (pinned to be881553f2)
Solutions
- Fill in the project location field (absolute path) in the wizard step
- Re-pick the parent directory via browse so the field is re-derived from the name
- Programmatically, set context.setProjectFileDir(LocalFileSystem.getInstance().refreshAndFindFileByPath(baseDir)) equivalent before validate()
Defensive patterns
Strategy: validation
Validate before calling
if (step.getProjectFileDirectory().isEmpty()) {
wizardContext.setProjectFileDir(VfsUtilCore.pathToUrl(defaultBaseDir));
}
step.validate(); Prevention
- Initialize the project file directory from the wizard's previously selected base path
- Recompute the directory whenever the name changes, unless user customized it
When it happens
Trigger: Calling validate() on ProjectNameStep while getProjectFileDirectory() returns the empty string — path component cleared or WizardContext has no project file directory set.
Common situations: User erased the location line in the new-project step; wizard reopened after an earlier failure leaving the path field blank; programmatic use without wizardContext.setProjectFileDir().
Related errors
- Enter {0} file location
- Enter module file location
- Enter a file name to create a new {0} {1}
- {0} location path should be absolute
- Enter a file name to create a new {0} {1}
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/f17bc42806c6fa2d.
Report an issue: GitHub.