cannot deploy on netlify with nuxt v.3.14 (compatibility version 4)

i try to publish a basic app on netlify, with nuxt v3.14 and compaibility version 4. Here's the code of the app (here). Find the error here: https://pastes.dev/fpPUqq6s50
pastes | fpPUqq6s50
A paste containing 37 lines of plaintext.
6 Replies
kapa.ai
kapa.aiβ€’5w ago
Hi @Cetus πŸ”›πŸ”. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the error log you provided and the information from the knowledge sources, it appears that you're encountering an issue related to the compatibility version 4 setting in Nuxt 3.14. The error suggests that there might be a problem with component resolution during the build process on Netlify. To address this issue, you can try the following steps: 1. First, ensure that you're using the latest version of Nuxt 3.14. You can update your package.json to use the latest version:
{
"dependencies": {
"nuxt": "^3.14.0"
}
}
{
"dependencies": {
"nuxt": "^3.14.0"
}
}
2. In your nuxt.config.ts file, make sure you have the correct compatibility settings:
export default defineNuxtConfig({
future: {
compatibilityVersion: 4
},
// other configurations...
})
export default defineNuxtConfig({
future: {
compatibilityVersion: 4
},
// other configurations...
})
3. If the issue persists, you might need to update your Vue dependency. As mentioned in a GitHub issue comment here (https://github.com/nuxt/nuxt/issues/28837), updating Vue to version 3.5 might help:
{
"dependencies": {
"vue": "^3.5.0"
},
"overrides": {
"nuxt": {
"vue": "^3.5.0"
}
}
}
{
"dependencies": {
"vue": "^3.5.0"
},
"overrides": {
"nuxt": {
"vue": "^3.5.0"
}
}
}
4. After making these changes, try deleting your node_modules folder and package-lock.json (or equivalent lock file), then reinstall your dependencies. 5. If you're still encountering issues, you might want to check your Netlify build settings. Ensure that you're using a Node.js version that's compatible with Nuxt 3.14 and Vue 3.5. If these steps don't resolve the issue, it might be worth considering temporarily reverting to compatibility version 3 to see if that resolves the deployment problem. You can do this by removing or commenting out the compatibilityVersion: 4 setting in your nuxt.config.ts. Remember that the compatibility version 4 is still in testing, as mentioned in the Nuxt upgrade guide (https://nuxt.com/docs/getting-started/upgrade#testing-nuxt-4), and there might be some unexpected issues when using it in production environments. If the problem persists after trying these steps, you may need to provide more detailed information about your project structure and Netlify configuration for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.aiβ€’5w ago
<@522123053581467669> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Philippe Serhal
Philippe Serhalβ€’4w ago
Hey @Cetus πŸ”›πŸ” I'm seeing the same thing! Thanks for sharing. The Nitro folks and I are looking into it now. Update: see https://github.com/nitrojs/nitro/issues/2846. This will be fixed asap in a nuxt patch (maybe even earlier if nitro cuts a patch with https://github.com/nitrojs/nitro/pull/2851 since that also fixes it for some cases).
Cetus πŸ”›πŸ”
Cetus πŸ”›πŸ”OPβ€’4w ago
thank you so much!! i tried to override the nitropack version like that:
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/eslint": "^0.6.1",
"nuxt": "^3.14.0",
"vue-router": "latest",
"vue": "^3.5.0"
},
"overrides": {
"nuxt": {
"nitropack": "2.10.3"
}
}
}
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/eslint": "^0.6.1",
"nuxt": "^3.14.0",
"vue-router": "latest",
"vue": "^3.5.0"
},
"overrides": {
"nuxt": {
"nitropack": "2.10.3"
}
}
}
but i still have the error, did i do something wrong?
Philippe Serhal
Philippe Serhalβ€’4w ago
I don't think that syntax is quite right, but in any case you don't need to hack it that way since a patch version of nuxt was released this morning. Just upgrade to the latest nuxt and you should be good!
Cetus πŸ”›πŸ”
Cetus πŸ”›πŸ”OPβ€’4w ago
oh yeees thanks
Want results from more Discord servers?
Add your server