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

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

Open
kinga112 opened this issue Jun 2, 2024 · 0 comments
Open

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

kinga112 opened this issue Jun 2, 2024 · 0 comments
Labels

Comments

@kinga112
Copy link

kinga112 commented Jun 2, 2024

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.

@kinga112 kinga112 added the bug label Jun 2, 2024
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