N
Nuxt9mo ago
skokan

Migrating from nuxt v2 to nuxt v3

Hello, im migrating project for new version, and at this step with tsconfig.json i try to generate tsconfig with npx nuxi prepare, but got error
ERROR Cannot read properties of undefined (reading 'nuxt')
at nuxtStyledResources (node_modules/@nuxtjs/style-resources/lib/module.js:7:25)
No description
2 Replies
Reinier Kaper
Reinier Kaper9mo ago
I've went through this process (still going through the migration actually) and restarted it about 10 times and the only thing I can recommend is to NOT try to upgrade to Nuxt 3, but create a fresh Nuxt 3 project and start moving things over one by one. We were never able to upgrade, mainly due to modules and the size of the project, so we're now running 2 versions in parallel and moving things over slowly. Building the Nuxt 3 base took us about 3 months before we could even move over the first (static) pages, but we have a Saas product, so it's quite large.
wattanx
wattanx9mo ago
As you may already know, Nuxt 3 requires the use of @nuxtjs/style-resources v2. https://github.com/nuxt-modules/style-resources/releases/tag/v2.0.0
GitHub
Release v2.0.0 · nuxt-modules/style-resources
2.0.0 and later support Nuxt 3 only. Use @nuxtjs/style-resources@^1 if you want to use it with Nuxt 2. 🚀 Features Support for Nuxt 3 (#214)
Want results from more Discord servers?
Add your server