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

Build error during "pc run --env prod" #292

Closed
wbfw109 opened this issue Jan 20, 2023 · 7 comments
Closed

Build error during "pc run --env prod" #292

wbfw109 opened this issue Jan 20, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@wbfw109
Copy link

wbfw109 commented Jan 20, 2023

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

@Alek99
Copy link
Member

Alek99 commented Jan 20, 2023

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 Alek99 added the bug Something isn't working label Jan 20, 2023
@wbfw109
Copy link
Author

wbfw109 commented Jan 21, 2023

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

@dev-onejun
Copy link
Contributor

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.

@wbfw109
Copy link
Author

wbfw109 commented Jan 21, 2023

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)

@dev-onejun
Copy link
Contributor

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

@Alek99
Copy link
Member

Alek99 commented Jan 22, 2023

@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

@wbfw109
Copy link
Author

wbfw109 commented Jan 25, 2023

@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 wbfw109 closed this as completed Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants