fumeapp / laranuxt

Laravel and Nuxt.js boilerplate

Repository from Github https://github.comfumeapp/laranuxtRepository from Github https://github.comfumeapp/laranuxt

"Request failed with status code 404" in console

connecteev opened this issue · comments

Thank you for this repo @acidjazz
This one isn't a blocker in any way, the code still runs, but this is what I see when I run npm run dev (notice "Request failed with status code 404")
Thought I would report it!

$ npm run dev

> laranuxt@1.0.0 dev /Users/kunalpunjabi/Code/LARAVEL_WORKING_CODE/NUXT/laranuxt
> nuxt config/

ℹ postcss-preset-env stage is set to 1 for supporting advanced css features                                                                                                      nuxt:tailwindcss 21:46:07
start Loading module                                                                                                                                                                nuxt-purgecss 21:46:07
ℹ PurgeCSS is not enabled because you are in dev mode                                                                                                                               nuxt-purgecss 21:46:07

 WARN  Address localhost:3000 is already in use.                                                                                                                                                  21:46:08

ℹ Trying a random port...                                                                                                                                                                         21:46:08

   ╭─────────────────────────────────────────────╮
   │                                             │
   │   Nuxt.js v2.8.1                            │
   │   Running in development mode (universal)   │
   │                                             │
   │   Listening on: http://localhost:49373/     │
   │                                             │
   ╰─────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                                                               21:46:12
ℹ Initial build may take a while                                                                                                                                                                  21:46:12
✔ Builder initialized                                                                                                                                                                             21:46:12
✔ Nuxt files generated                                                                                                                                                                            21:46:12

✔ Client
  Compiled successfully in 14.42s

✔ Server
  Compiled successfully in 13.70s

ℹ Waiting for file changes                                                                                                                                                                        21:46:31
ℹ Memory usage: 241 MB (RSS: 323 MB)                                                                                                                                                              21:46:31

 ERROR  Request failed with status code 404                                                                                                                                                       21:46:38

  at createError (node_modules/axios/lib/core/createError.js:16:15)
  at settle (node_modules/axios/lib/core/settle.js:17:12)
  at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:237:11)
  at IncomingMessage.emit (events.js:187:15)
  at IncomingMessage.EventEmitter.emit (domain.js:442:20)
  at endReadableNT (_stream_readable.js:1094:12)
  at process._tickCallback (internal/process/next_tick.js:63:19)

thanks @connecteev .. interesting, i've never seen it go after a random port, mine always hops on 3000. i'll look into this.

did you run yarn api first in another window so that the proxy can connect?

@acidjazz yes I did run it! It's not a blocker issue, and wish I could be of more help, I'm very new to nuxt. Do want to say that I am super appreciative of you and others like you for sharing your code and helpingthe community.

@connecteev do you have something else running on port 3000 ? i have that port configured in the .env folder so i can see how that might be an issue

If you cannot use 3000 then do this:

  1. change nuxt.config.js and add:
  server: {
    port: 3001,
  }
  1. go into your .env and change APP_API to point at your newly defined port

  2. clear your laravel config cache

@acidjazz interesting. I did have another nuxt codebase running on port 3000. Terminating that made the error go away.
Now that the error is gone, I see the user cards at localhost:3000 (I wasn't expecting to).

There is one (small) inconsistency, not sure if it's a bug. But if you go to http://localhost:3000/api/example, and then press back, the cards no longer show up.
Is this because there's no SSR the 2nd time?
https://prnt.sc/og452o
https://prnt.sc/og4590

@connecteev hmm.. interesting.. i don't konw..

I plan to remove a bunch of that stuff though and replace it with a more skeletal example using tailwindcss only, i don't think bulma is really needed in this anymore. id rather the boilerplate be easier to clean up of sample code

@acidjazz Completely agree on removing bulma in place of tailwindcss. Tailwind rocks!

@connecteev great, working on this now, should have something cleaner up in 15-20m :)

@acidjazz love it..by the way, are you open to suggestions to turn this codebase into a "kitchen-sink" or showcase application for laravel+nuxt (instead of just a skeleton)? I can make suggestions if so.
Example: "It would be cool if.. " yadda yadda :)

@connecteev totally open, name em, make isssues or 1 issue w/ a list, also check out the updated version and lmk if it works for you this time