python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.28k stars 581 forks source link

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

Open kinga112 opened 1 month ago

kinga112 commented 1 month ago

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

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

Additional context Add any other context about the problem here.