Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Javascript function in React doesn't work after build in Prod. #732

Open

Description

@kinga112

Eel version
Please state the version of Eel you're using.
0.16.0

Describe the bug
A clear and concise description of what the bug is.

AttributeError: module 'eel' has no attribute 'getEmailsPortal'
eel.expose(getEmailsPortal)
function getEmailsPortal(){
getEmails()
}
Works fine in debug mode with this config:
eel.init('client/src/api', allowed_extensions=['.ts'])
eel_kwargs = dict(
host='localhost',
port=8899,
)
eel.start({'port': 3000}, geometry={'size': (1280, 800), 'position': (50, 50)}, **eel_kwargs)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

npm run build on application and package with pyinstaller

Expected behavior
A clear and concise description of what you expected to happen.

Ability to run javascript function from python in production like how it works in debug.

System Information

  • OS: [e.g. Windows 10 x64, Linux Ubuntu, macOS 12]
    MacOS Sonoma 14
  • Browser: [e.g. Chrome 108.0.5359.99 (Official Build) (64-bit), Safari 16, Firefox 107.0.1]
    Chrome
  • Python Distribution: [e.g. Python.org 3.9, Anaconda3 2021.11 3.9, ActivePython 3.9]
    Python 3.12.3

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions