-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Unable To Start Webapp #153
Comments
@spenpal - when you ran |
@Sayvai |
@spenpal I believe that since you're running a Windows WSL ubuntu shell, the error message you're seeing; So try this. In - "fastapi-dev": "source ../env/bin/activate && pip install -r ../requirements.txt && python -m uvicorn backend.api.index:app --reload",
+ "fastapi-dev": ". ../env/bin/activate && pip install -r ../requirements.txt && python -m uvicorn backend.api.index:app --reload", Save the change locally, and try running If that works, then I'll raise a PR for that fix, so that the npm script will work in both Mac OS and Windows WSL Ubuntu shell environments. |
This is my new error, after making the changes you suggested.
|
@spenpal the following error message suggests that the Python environment activation script (
Given that, did you visually inspect that the If the directory and script does not exist, then that suggests the Python virtual environment (named |
A bug was found (see GitHub Issue srbhr#153), where when a user attempting to run the `npm run dev` or `npm run fastapi-dev` commands from within a (Windows) WSL Ubunutu Shell window, encounters the following error, which prevents the backend FastAPI server from running: `sh: 1: source: not found` Given it appears that `source` is a command built-in and runnable on Bash and ZSH terminal environments, it is not available to use within the WSL Ubuntu shell by default. To fix this, a more universal substitute can be used in place of `source`, which is the period `.`, which performs the same function in Bash, ZSH, and WSL Ubunutu terminal / shell environments.
A bug was found (see GitHub Issue srbhr#153), where when a user attempting to run the `npm run dev` or `npm run fastapi-dev` commands from within a (Windows) WSL Ubunutu Shell window, encounters the following error, which prevents the backend FastAPI server from running: `sh: 1: source: not found` Given it appears that `source` is a command built-in and runnable on Bash and ZSH terminal environments, it is not available to use within the WSL Ubuntu shell by default. To fix this, a more universal substitute can be used in place of `source`, which is the period `.`, which performs the same function in Bash, ZSH, and WSL Ubunutu terminal / shell environments.
A bug was found (see GitHub Issue srbhr#153), where when a user attempting to run the `npm run dev` or `npm run fastapi-dev` commands from within a (Windows) WSL Ubunutu Shell window, encounters the following error, which prevents the backend FastAPI server from running: `sh: 1: source: not found` Given it appears that `source` is a command built-in and runnable on Bash and ZSH terminal environments, it is not available to use within the WSL Ubuntu shell by default. To fix this, a more universal substitute can be used in place of `source`, which is the period `.`, which performs the same function in Bash, ZSH, and WSL Ubunutu terminal / shell environments. This commit also includes minor `webapp/README.md` updates to reforat lists to numbered lists for both the `Setup` and `Debugging` sections.
A bug was found (see GitHub Issue srbhr#153), where when a user attempting to run the `npm run dev` or `npm run fastapi-dev` commands from within a (Windows) WSL Ubunutu Shell window, encounters the following error, which prevents the backend FastAPI server from running: `sh: 1: source: not found` Given it appears that `source` is a command built-in and runnable on Bash and ZSH terminal environments, it is not available to use within the WSL Ubuntu shell by default. To fix this, a more universal substitute can be used in place of `source`, which is the period `.`, which performs the same function in Bash, ZSH, and WSL Ubunutu terminal / shell environments. This commit also includes minor `webapp/README.md` updates to reformat lists to numbered lists for both the `Setup` and `Debugging` sections for improved clarity.
@spenpal is this issue fixed now? |
@srbhr I realized my initial issue. I use a package manager called PDM, which uses I changed the script command to reflect my setup, and it works perfectly fine now. This is what I get now at the frontpage of the webapp: I am getting the following debug messages. Not sure if it is pertinent to successfully run the app because I am getting the default screen for the
|
[1] DEBUG Error retreiving service keys:
[1] INFO: ::ffff:127.0.0.1:0 - "GET /api/service-keys HTTP/1.1" 500 Internal Server Error
[0] No configurable service keys found. If this is unexpected, please check the GET API response to '/api/service-keys'. Until recently, the
|
Hey @Sayvai , I'm on Windows and not using WSL. Just have NodeJS and Python. The Python virtual environment is activated via env/Scripts/activate instead of env/bin/activate. Would it be okay to add another script in package.json for Windows-targeted folks? Probably need to add this:
Followed by: Note: I have done this in my local workspace and not planning to push to main yet. |
Hey @imhalcyon, Thanks for highlighting this particular issue for Windows (non-WSL) users. That makes perfect sense, and I agree with the consistent naming conventions for the additional npm scripts / tasks suggestions. If you don't mind, please create a fork of the Good spot! |
Done. Please check whenever possible: #185 |
Hey, could you please tell me where can i find: |
Hi @SnehaJainM |
Describe the bug
I get the Error: connect ECONNREFUSED 127.0.0.1:8000 error when I try to run
npm run dev
, so I tried to runnpm run fastapi-dev
in another terminal. However, I get an error saying:sh: 1: source: not found
.Full bug error from
npm run fastapi-dev
:To Reproduce
Steps to reproduce the behavior:
npm run fastapi-dev
.Desktop:
The text was updated successfully, but these errors were encountered: