Nuxt prepare error
In the last few days I can't create a nuxt app (using
nuxi init
) without getting this error during nuxt prepare
after installing the dependencies (or subsequently after every npm i
):
Does anyone know how I could fix that? (I mean I can remove the postinstall script that runs nuxt prepare
but any other solutions?)6 Replies
Hi @svecs132. 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 knowledge sources provided, I don't have specific information about the exact error you're encountering. However, there are a few relevant points that might help:
1. There have been recent issues with dependency versions in Nuxt, particularly with the
db0
package. This was causing errors during initialization and preparation of Nuxt projects. Github Issue (closed): Broken init
2. The issue with db0
has been fixed in its latest version. As suggested by a Nuxt team member, upgrading your dependencies and lock file might resolve the problem. Github Issue (closed): Broken init
3. In some cases, users have reported that removing global installations of Nuxt-related packages and reinstalling dependencies in the project folder has helped resolve similar issues. Github Issue (closed): WARN [nuxt] Expected @nuxt/kit @nuxt/schema
Given this information, here are some steps you could try:
1. Update all your Nuxt-related dependencies to their latest versions.
2. Delete your node_modules
folder and package-lock.json
(or equivalent for your package manager), then reinstall dependencies.
3. If you have any global installations of Nuxt or related packages, consider removing them and relying only on local project dependencies.
4. If the issue persists, you might want to check if there are any conflicting versions of Nuxt-related packages in your project.
If these steps don't resolve the issue, you might want to report this specific error to the Nuxt GitHub repository, as it seems to be a new issue not covered in the provided knowledge sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@497916206343258112> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Here's the complete log (with replaced directory names)
And here's the output of
npx nuxi info
from the directoryNuxt 1.4.5? How’s that possible then 😂
Try
npx nuxi@latest init
WHAT i ran it with
@latest
like 10 times and i always got the same error but now it works