Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error message when --out is set to the folder containing the entry point #1685

Open
3 tasks done
Renpona opened this issue Mar 2, 2024 · 1 comment
Open
3 tasks done
Labels

Comments

@Renpona
Copy link

Renpona commented Mar 2, 2024

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Packager Version:
    • 18.1.3
  • Electron Version:
    • 29.1.0
  • Operating System:
    • Windows 10
  • Last Known Working Electron Packager version::
    • N/A

Expected Behavior

If the --out flag is used to set the target directory to the same directory that contains the entry point, then running electron-packager should present an error message explaining that this is not supported.

Actual Behavior

If the --out flag is used to set the target directory to the same directory that contains the entry point, then running electron-packager will result in a "The main entry point to your app was not found" error message, which does not correctly identify the problem.

To Reproduce

Create a directory structure like this:

root/
    package.json
    /dist
        code.js

In package.json, set the entry point with "main" to "dist/code.js", "./dist/code.js", or "dist\code.js".

Now run electron-packager with the command-line

electron-packager . test --platform win32 --out ./dist

The error it will return is:

The main entry point to your app was not found. Make sure "dist\code.js" exists and does not get ignored by your ignore option

This is a misleading error message for the user, however, as changing the --out target to a different directory resolves the problem.

Copy link

welcome bot commented Mar 2, 2024

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant