reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Cannot find bun file

Open SpyderRex opened this issue 2 years ago β€’ 3 comments

Describe the bug I use the command of run, but it throws an error saying the bun file does not exist, even though it does and it is on my PATH. I am using a Linux os on Android, namely Userland Ubuntu. When I type "which bun", it gives the exact same path that it uses when it says the file cannot be found.

Traceback userland@localhost:~/PyneProj$ pc run ────────────────── Starting Pynecone App ────────────────── ────────────── Installing frontend packages ─────────────── Traceback (most recent call last): File "/usr/local/bin/pc", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/typer/main.py", line 214, in call return get_command(self)(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/typer/main.py", line 532, in wrapper return callback(**use_params) # type: ignore File "/usr/local/lib/python3.10/dist-packages/pynecone/pc.py", line 120, in run frontend_cmd(app.app, Path.cwd(), frontend_port) File "/usr/local/lib/python3.10/dist-packages/pynecone/utils.py", line 634, in run_frontend setup_frontend(root) File "/usr/local/lib/python3.10/dist-packages/pynecone/utils.py", line 615, in setup_frontend install_frontend_packages() File "/usr/local/lib/python3.10/dist-packages/pynecone/utils.py", line 458, in install_frontend_packages subprocess.run( File "/usr/lib/python3.10/subprocess.py", line 501, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.10/subprocess.py", line 969, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/home/userland/.bun/bin/bun'

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

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

  • Python Version: 3.10.6
  • Pynecone Version: 0.1.20
  • OS: Linux
  • Browser (Optional):

Additional context Add any other context about the problem here.

SpyderRex avatar Mar 14 '23 00:03 SpyderRex

I see, can you try putting that path from which bun in your pcconfig for bun_path and see if you still get the error

Alek99 avatar Mar 14 '23 04:03 Alek99

You're referring to the config.py file, am I correct? I tried that and it is still throwing up the same error. It is still saying the file does not exist, even though it does.

On Mon, Mar 13, 2023, 11:44 PM Alek Petuskey @.***> wrote:

I see, can you try putting that path from which bun in your pcconfig for bun_path and see if you still get the error

β€” Reply to this email directly, view it on GitHub https://github.com/pynecone-io/pynecone/issues/672#issuecomment-1467350866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXG3DUB4X6YUHHMLIZTLLUDW37ZTVANCNFSM6AAAAAAVZYXWNE . You are receiving this because you authored the thread.Message ID: @.***>

SpyderRex avatar Mar 14 '23 12:03 SpyderRex

I think I figured it out. As far as I can tell, there isn't a 32-bit version of bun and my system happens to be 32-bit (armv7l). I should have specified that. Sorry for the confusion. Is there another way to use Pynecone with my architecture?

On Tue, Mar 14, 2023, 7:06 AM Billy Johnson @.***> wrote:

You're referring to the config.py file, am I correct? I tried that and it is still throwing up the same error. It is still saying the file does not exist, even though it does.

On Mon, Mar 13, 2023, 11:44 PM Alek Petuskey @.***> wrote:

I see, can you try putting that path from which bun in your pcconfig for bun_path and see if you still get the error

β€” Reply to this email directly, view it on GitHub https://github.com/pynecone-io/pynecone/issues/672#issuecomment-1467350866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXG3DUB4X6YUHHMLIZTLLUDW37ZTVANCNFSM6AAAAAAVZYXWNE . You are receiving this because you authored the thread.Message ID: @.***>

SpyderRex avatar Mar 14 '23 17:03 SpyderRex

Got it we need to make a fallback to npm if the system does not support bun.

Will get this in one of the next releases.

Alek99 avatar Mar 28 '23 04:03 Alek99

Now that I am thinking more about this feature I am going to make an argument in the pcconfig to not use bun. That way we don't manually have to keep track of which os works with that dependency.

Alek99 avatar Apr 03 '23 23:04 Alek99