Node/Nuxt.js: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 11: Line 11:
== Slow in WSL ==
== Slow in WSL ==


Accessing the Windows host’s folders from WSL causes a lot of I/O overhead, which makes Node builds take way too long. You should move the project to the WSL internal filesystem and use the VSCode WSL extension to develop instead.
Accessing the Windows host’s folders from WSL causes a lot of I/O overhead, which makes Node builds take way too long.
 
You should move the project to the WSL internal filesystem and use the VSCode WSL extension to develop instead.


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">

Revision as of 06:19, 9 September 2026

npm create nuxt@latest test-nuxt
cd test-nuxt
pnpm approve-builds
pnpm dev


Trouble Shooting

Slow in WSL

Accessing the Windows host’s folders from WSL causes a lot of I/O overhead, which makes Node builds take way too long.

You should move the project to the WSL internal filesystem and use the VSCode WSL extension to develop instead.

$ nuxt dev
                                                                                                                                     2:14:45 PM
  Nuxt 4.5.2 (with Nitro 2.13.4, Vite 8.2.2 and Vue 3.5.42)
                                                                                                                                      2:14:45 PM
   Local:    http://localhost:3000/
   Network:  use --host to expose

   DevTools: press Shift + Alt + D in the browser (v3.4.2)                                                                           2:14:58 PM


 WARN  [NUXT_B8014] Module @nuxt/devtools was slow to set up, taking 7352.2ms.                                                        2:14:58 PM
╰▶ fix: Defer expensive operations to a later hook (e.g. build:before) to reduce startup time.

Cannot access WSL Ubuntu

New-NetFirewallRule -DisplayName "Nuxt WSL Port 3000" -Direction Inbound -LocalPort 3000 -Protocol TCP -Action Allow