N
Nuxt2y ago
less

get started with nuxt 3 but get nuxt 2

i've try to make a new project using nuxt 3 cli with this command
npx nuxi@latest init my-app
npx nuxi@latest init my-app
when done npm install , i caught an error "defineNuxtConfig" is not defined. i tried to see the nuxt version using npx nuxi info. then i got this
------------------------------
- Operating System: Darwin
- Node Version: v18.16.0
- Nuxt Version: 2.15.8
- Nitro Version: 2.3.3
- Package Manager: [email protected]
- Builder: webpack
- User Config: -
- Runtime Modules: -
- Build Modules: -
------------------------------
------------------------------
- Operating System: Darwin
- Node Version: v18.16.0
- Nuxt Version: 2.15.8
- Nitro Version: 2.3.3
- Package Manager: [email protected]
- Builder: webpack
- User Config: -
- Runtime Modules: -
- Build Modules: -
------------------------------
instead got nuxt 3 , i got nuxt 2. can someone help me?
10 Replies
less
less2y ago
my nuxi version is 3.4.3
warflash
warflash2y ago
have you tried npx nuxi init my-app?
less
less2y ago
yes, before using the nuxi@latest, i've tried to use the nuxi init. it is still the same i've tried several things , from downgrading my nuxi to 3.2, uninstall and install the nuxt 3.2 , and use npx nuxi upgrade -f. none of them working
warflash
warflash2y ago
That is strange just tested locally and it works fine perhaps there is some npm cache weirdness going on?
less
less2y ago
so before trying to create new project. on my previous project, i delete my node and package lock, and try to install the new one. then just like that, everything broking up if i may know, what's ur version of nuxi, sir?
warflash
warflash2y ago
3.4.3
less
less2y ago
i see, im trying to clear my npm cache. thankyou for helping sir
warflash
warflash2y ago
you're welcome and good luck 👌 let me know if it worked out
less
less2y ago
i'm devastated not knowing why using npx nuxi upgrade --force , wont updated to the latest nuxt version and still got nuxt 2.15.8 Hello , sir @warflash . thanks for the help , i got it solved by deleting my package.json on my root directory that installed nuxt 2 ( i dont know how i got it somehow ). appreciate the help!
warflash
warflash2y ago
oh nice, glad to hear you got it resolved! :)
Want results from more Discord servers?
Add your server