SDK build failed with exit code: 2
I'm beginer and each new project that I created has this error, I'm using WSL
2 Replies
Hi @Phuong. 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 information provided in the knowledge sources, it seems you're encountering an issue related to using Wasp with WSL (Windows Subsystem for Linux). This is a common problem for Windows users trying to use Wasp. Here's what might be causing the issue and how you can potentially resolve it:
1. File System Location: If you're using WSL2, make sure your Wasp project is located on the Linux file system, not the Windows file system. Wasp can't detect file changes properly if the project is on the Windows file system due to a known issue in WSL2 (https://github.com/wasp-lang/wasp/issues/603).
2. WSL Setup: Ensure you've set up WSL correctly for Wasp development. You can follow the guide for Windows development with Wasp using WSL (https://wasp-lang.dev/blog/2023/11/21/guide-windows-development-wasp-wsl) for detailed instructions.
3. Node.js Version: Make sure you have the correct version of Node.js installed. Wasp requires Node.js version 18 or higher. You can use nvm (Node Version Manager) to manage your Node.js installation. Here's how to check your Node.js version:
If it's below 18, you'll need to update it.
4. Permissions: There might be permission issues with Docker or other dependencies. If you're using Docker, make sure it's set up correctly for non-root users as described in the Docker post-installation steps for Linux (https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).
If you've checked all these points and are still encountering issues, you might need to provide more specific error messages or details about your setup for further assistance. The Wasp community on Discord (https://discord.gg/rzdnErX) is also a great place to get help with specific issues.
Remember, as a beginner, working with WSL and Wasp can be challenging. Don't get discouraged if you encounter difficulties. The Wasp team is continuously working on improving the experience for Windows users.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Phuong, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
@Phuong can you pls try updating yoour node / npm to newer version? E.g. node 20?
Btw @Phuong I am curios what is your OS? Are you on WSL? I am curious how you ended up with this older version of node/npm (if I am correct0