Nuxt 3 local server cannot start, npm run dev does not work
P粉005105443
P粉005105443 2023-12-10 18:03:24
0
1
563

My Nuxt application was originally built using Nuxt2, but recently I encountered some errors while using ESlint and I was forced to upgrade and migrate the application to Nuxt3.

However, when migrating, the application local server is not started using the startup script. Below is an image showing the output when runningnpm run dev

Nodejs:18^

nuxtjs: 3^

vuejs:2.7^

P粉005105443
P粉005105443

reply all (1)
P粉696891871

Nuxt3 uses Vue3, not Vue2.7.
Also, when you runnpm run devyour application runs fine, so you don't need to runnpm nuxi devseparately.

You can runnpx nuxi-edge@latest devassuggested here.
This feature works becausenpxinstead ofnpm, which is completely different.npxInstead of requiring you to install the package locally or globally on your system, it can remotely take the entire code and run it immediately.

In your case though: usenpm run devand that'll be fine.
No need to run it through npx/nuxi, that just adds latency.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!