Skip to content

fix: warn when favicon.ico is missing in generated project#416

Open
Samridhi-2007 wants to merge 1 commit intoneutralinojs:mainfrom
Samridhi-2007:fix-favicon-warning
Open

fix: warn when favicon.ico is missing in generated project#416
Samridhi-2007 wants to merge 1 commit intoneutralinojs:mainfrom
Samridhi-2007:fix-favicon-warning

Conversation

@Samridhi-2007
Copy link
Copy Markdown

Related Issue

Fixes #415

Problem

When creating a new Neutralinojs application using:

neu create
cd
neu run

the application logs a runtime error:
Unable to load application resource file /resources/favicon.ico

Root Cause

The default template (neutralinojs/neutralinojs-minimal) does not include a favicon.ico file in the resources/ directory. This results in runtime error logs, which can be confusing for new users.

Solution

This PR introduces a proactive check during project creation:

  • Detects if resources/favicon.ico is missing
  • Displays a clear warning message to the user instead of relying on runtime errors

Changes Made

  • Added a file existence check for resources/favicon.ico in:
    src/modules/creator.js

  • Displays the following warning if the file is missing:

Warning: favicon.ico not found in resources/. This file is optional but recommended.

Impact

  • Improves developer experience
  • Reduces confusion caused by runtime error logs
  • Provides clearer feedback to users without affecting existing functionality

Testing

  • Created a new project using neu create
  • Verified that the warning message appears correctly
  • Confirmed that existing functionality remains unchanged

Note

A potential future improvement would be to include a default favicon.ico in the template repository to eliminate this issue entirely.

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.

Bug: Missing favicon.ico in default template causes runtime resource error

1 participant