Local dev server with netlify cli and Nuxt3

Hello,

I’m trying to setup the local development environment with the netlify cli and a Nuxt3 app.

I created a default Nuxt3 app with

npx nuxi init test

then I ran

netlify init
netlify dev

I didn’t create any netlify.toml file, (the solution proposed here) doesn’t work. I have the latest netlify cli version.

I have the following errors when the browser opens up on localhost:8888:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
:8888/src/main.ts:1 

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
:8888/@vite-plugin-pwa/pwa-entry-point-loaded:1 

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

manifest.webmanifest:1 Manifest: Line: 1, column: 1, Syntax error.

Did anyone managed to have a working local dev environment with nuxt3 and netlify dev ?

Thank you very much!

hi @Cuke7

I ran those same steps:

npx nuxi init test
cd test && npm i
netlify init
netlify dev

… and was able to start a test environment:

Are you testing with the untouched default app or have you added something else?

I am using this node/npm version:

❯ node -v
v16.18.0
❯ npm -v
8.19.2

Hope this helps!