bun x nuxi@latest init <project-name>
Bun could not find a package.json file to install from

2 Replies
Hi @AsapJohn. 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, it appears that there might be an issue with the command you're trying to run. Let me provide you with the correct information for initializing a new Nuxt project using Bun.
According to the Nuxt documentation on installation, the correct command to initialize a new Nuxt project using Bun is:
This command should work correctly. If you're encountering the error "Bun could not find a package.json file to install from", it's possible that there might be an issue with your local Bun installation or the current directory you're in.
To troubleshoot this issue, you can try the following steps:
1. Ensure you're running the command in a directory where you have write permissions.
2. Make sure you have the latest version of Bun installed.
3. If the issue persists, you might want to try using npm instead:
If you continue to experience problems, it might be helpful to check the Bun documentation or seek support from the Bun community, as this specific error message is not addressed in the provided Nuxt documentation.
Remember, after successfully initializing your project, you can use Bun for development by running:
This command is mentioned in the Nuxt documentation for starting the development server with Bun.
If you continue to face issues, you might want to consider using npm or yarn as alternative package managers for your Nuxt project initialization.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@940956799312494614> Kapa.ai is still learning and improving, please let me know how I did by reacting below.