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

Front end won't start because nuxt not found #9

Closed
dividor opened this issue Jan 27, 2023 · 2 comments
Closed

Front end won't start because nuxt not found #9

dividor opened this issue Jan 27, 2023 · 2 comments

Comments

@dividor
Copy link

dividor commented Jan 27, 2023

Hi There,

First, thanks SO much for this repo, it's a huge help!

The backend starts nicely, but the frontend container fails with the following ...

**docker logs my-app-frontend-1**
yarn run v1.22.19
$ nuxt dev
/bin/sh: 1: nuxt: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I saw no errors with the docker build and start.

Thanks!

@turukawa
Copy link
Member

Hey @dividor I've had this problem as well and I think it's purely for the dev environment. This never worked well with the Vue/Nuxt frontend on the original fullstack because it doesn't do hot reload, even though it used to start. Now, for some reason, it doesn't reference the nuxt dev command correctly (something to do with the path), which may have something to do with errors in nuxt itself ... still a very new release with a few glitches.

For development, what I do is simply run the frontend directly (i.e. outside of docker). I've got that in the readme.

NOTE: I find that the Nuxt container does not run well in development mode, and does not refresh on changes. In particular, nuxt/content is very unpredictable in dev mode running in the container. It is far better to run the frontend outside of the container to take advantage of live refresh.

Change into the /frontend folder, and:

yarn install
yarn dev

Just note that you'll use http://localhost:3000 and not http://localhost to reach it, although the api will still be at the backend http://localhost/api/v1.

I find it more responsive to work this way, otherwise you're messing around with starting and stopping your docker containers to get the updates you need on Nuxt.

@dividor
Copy link
Author

dividor commented Jan 28, 2023

Thanks for the workaround @turukawa!

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

2 participants