reflex icon indicating copy to clipboard operation
reflex copied to clipboard

pc init does not fail when curl and unzip are not installed.

Open brianmcconnel opened this issue 3 years ago β€’ 0 comments

Description When curl and unzip is not installed the pc init command shows Finished Initializing even though it failed. When you go on to do a pc run pynecone fails to find bun. Resulting in the FileNotFoundError from #115. I hesitate to call this a bug; however, this might improve usability for first time users.

To Reproduce Steps to reproduce the behavior:

  • On a linux pc without curl or unzip installed create a conda environment using mamba
  • mamba create -n pc python
  • mamba activate pc
  • mamba install nodejs
  • pip install pynecone-ip
  • pc init

Expected behavior Expect Failed Initializing : curl was not installed. Or add curl, unzip to the dependencies.

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

** Specifics (please complete the following information):**

  • Python Version: 3.10
  • Pynecone Version: 0.1.8
  • OS: WSL Debian
  • Browser (Optional): NA

Additional context

$  pc init
[06:05:15] Installing bun...                                                                                 pc.py:43
β ‹ Initializing pc_appsh: 1: curl: not found
           Initializing the web directory.                                                                   pc.py:47
           Finished Initializing: pc_app
$ pc init
[06:08:16] Installing bun...                                                                                 pc.py:43
β ‹ Initializing pc_app  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7191    0  7191    0     0  18668      0 --:--:-- --:--:-- --:--:-- 18677
error: unzip is required to install bun (see: https://github.com/oven-sh/bun#unzip-is-required)
[06:08:17] Initializing the web directory.                                                                   pc.py:47
           Finished Initializing: pc_app

$ pc run
FileNotFoundError: [Errno 2] No such file or directory: '/home/<username>/.bun/bin/bun'

brianmcconnel avatar Jan 29 '23 14:01 brianmcconnel