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

error Couldn't find a package.json file in "/app" #406

Open
byanko55 opened this issue Aug 7, 2023 · 0 comments
Open

error Couldn't find a package.json file in "/app" #406

byanko55 opened this issue Aug 7, 2023 · 0 comments

Comments

@byanko55
Copy link

byanko55 commented Aug 7, 2023

I've followed the tutorial section "using-docker-compose" on Ubuntu 20.04.6 LTS on WSL.

When I run the below commands, the app container does not appear in the running container list; it just showed up being terminated as seen from the output of docker ps -a.

docker run -dp 3000:3000 \
  -w /app -v "$(pwd):/app" \
  --network todo-app \
  -e MYSQL_HOST=mysql \
  -e MYSQL_USER=root \
  -e MYSQL_PASSWORD=secret \
  -e MYSQL_DB=todos \
  node:18-alpine \
  sh -c "yarn install && yarn run dev"

image


The execution log of todo-app is

$ 
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.03s.
yarn run v1.22.19
error Couldn't find a package.json file in "/app"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there any solution?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant