reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Build error during "pc run --env prod"

Open wbfw109 opened this issue 3 years ago β€’ 6 comments

Describe the bug I don't know what's problem. Running in development works well (pc run). but in production not. (pc run --env prod )

To Reproduce Steps to reproduce the behavior:

  • My pcconfig.py
config = pc.Config(
    app_name="glossary_app",
    api_url="192.168.0.4:8000",
    bun_path="$HOME/.bun/bin/bun",
    db_url="sqlite:///pynecone.db",
)
  • and run pc run --env prod in fish shell

Expected behavior Server will be opend.

Screenshots image

Specifics (please complete the following information):

  • Python Version: 3.11.0
  • Pynecone Version: pynecone-io = "^0.1.12"
  • OS: WSL Ubuntu 22.04 distribution in Windows 11 Version 21H2 (OS Build 22000. 1455)
  • Browser (Optional): Edge Browser
  • Shell: Fish shell

Additional context After the error occurs, port 8000 always in used. It is recreated with new PID even if I kill it's PID. β”” This only seems to happen when I exit VS code with server is opening. πŸ“… updated on 2023-01-21 10:00:04

wbfw109 avatar Jan 20 '23 08:01 wbfw109

Ok interesting I haven't experienced this error before but I'll try and recreate. Just to make sure your local host 3000 is not working right, is it just a blank page?

Alek99 avatar Jan 20 '23 23:01 Alek99

Yes. the error output is same even if the page is empty. ( def index() returns pc.text("testing...") )

wbfw109 avatar Jan 21 '23 01:01 wbfw109

I'm sorry to bother you, but ..

did you install node version more than 12.22.0?

It seems that all the errors are related to node.

dev-onejun avatar Jan 21 '23 01:01 dev-onejun

I'm sorry to bother you, but ..

did you install node version more than 12.22.0?

It seems that all the errors are related to node.

My node version is v18.12.1 (installed from nvm)

wbfw109 avatar Jan 21 '23 01:01 wbfw109

note: I failed to regenerate to make the issue.

The following environments are that I tried.

  1. ubuntu 22.04.01 / python 3.11.0rc1 / node 18.12.1 with nvm / pynecone-io 0.1.13 / Fish shell

  2. Windows 10 WSL ubuntu 22.04.01 / python 3.11.0rc1 / node 18.12.1 with nvm / pynecone-io 0.1.13 / Fish shell

dev-onejun avatar Jan 22 '23 03:01 dev-onejun

@dev-onejun Thanks for trying to reproduce. I can't reproduce this either, mine seems to work alright. If anyone else gets this issue I'll look into it more. Sorry for this issue @wbfw109 maybe it will be resolved in newer future versions can't seem to pin this error as of now

Alek99 avatar Jan 22 '23 03:01 Alek99

@dev-onejun Thanks for trying to reproduce. I can't reproduce this either, mine seems to work alright. If anyone else gets this issue I'll look into it more. Sorry for this issue @wbfw109 maybe it will be resolved in newer future versions can't seem to pin this error as of now

I solved. (but I don't know exact reason)

List of what I did:

  • remove Pynecone previous version and install pre-release version = "0.1.13" in poetry. (Updated on πŸ“… 2023-01-25 19:05:05)
    • backup my Pynecone app .py and remove existing my app directory.
    • $shell:fish> pc init and move the previous backed up files to the proper location.
  • Shell:pwsh> Get-Service LxssManager | Restart-Service (WSL2 connect bug)
    and restart computer

pyconfig.py:

config = pc.Config(
    app_name="glossary_app",
    api_url="http://localhost:8000",
    bun_path="$HOME/.bun/bin/bun",
    db_url="sqlite:///pynecone.db",
)

and run (I ignore the eslint installation error.) pynecone-io-0 1 13v_2

I carefully guess that it was a problem with the version of Pynecone.

Thank you all for your interest in this issue. :) If there are no problems for a while, I will close this issue.

wbfw109 avatar Jan 25 '23 09:01 wbfw109