Skip to content

Commit

Permalink
fix: webapp - wsl shell source not found
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sayvai committed Sep 23, 2023
1 parent ebf6983 commit eb23930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"next-dev": "next dev",
"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",
"dev": "concurrently \"npm run next-dev\" \"npm run fastapi-dev\"",
"build": "next build",
"start": "next start",
Expand Down

0 comments on commit eb23930

Please sign in to comment.