W
Wasp4mo ago
jmeena660

Process to start development version of Wasp

I want to know how i can start development version of Wasp , current i am using wsl -> git clone "url" then cd wasp after that go to desired folder and wasp start , but for the issue #2798 (https://github.com/wasp-lang/wasp/issues/2798) i am not getting the bug mentioned , you can read the thread for more info THANKS
11 Replies
kapa.ai
kapa.ai4mo ago
Hi @jmeena660. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To start the development version of a Wasp app, the standard process is: 1. Clone the Wasp project repository (if you haven't already):
git clone <repo-url>

git clone <repo-url>

2. Change into the project directory:
cd <project-directory>

cd <project-directory>

3. Start the development server:
wasp start

wasp start

This will launch your Wasp app in development mode, automatically open a browser tab at http://localhost:3000, and watch for changes in your .wasp and src/ files to hot-reload the app. You should see log messages from the client, server, and database as they start up. The first run may take a bit longer as everything is set up for the first time Docs: Creating a New Project. Special note for WSL2 users:
If you are using WSL2, make sure your Wasp project is located on the Linux file system (e.g., under /home/<user>/), not on the Windows file system (e.g., /mnt/c/). If your project is on the Windows file system, file change detection (and thus hot reloading) will not work due to a known WSL2 issue. The recommended workaround is to move your project to the Linux file system. You can still use editors from Windows to edit files in the Linux file system WSL2 Hot Reload Issue, Quick Start: Installation. If you are not seeing the bug from issue #2798, double-check that you are running the app from the correct location and that your environment matches the one described in the issue. If you are following the above process and still cannot reproduce the bug, it may be due to differences in your setup or the specific conditions required for the bug to appear. If you need to run the Wasp compiler or server directly from the source (for example, if you are developing Wasp itself), you may need to build Wasp from source using Cabal, as described in the installation docs. However, for most app development, the steps above are sufficient Quick Start: Installation. If you need more specific instructions for running a development version of Wasp itself (not just a Wasp app), the knowledge sources do not provide detailed steps for that scenario. Let me know if you need that information! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @jmeena660, 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?
jmeena660
jmeena660OP4mo ago
wasp/core/serialization is calling @prisma/client as part of its logic. When the Prisma schema doesn't have any models, @prisma/client is an empty placeholder in the CJS format instead of ESM, which trips up Vite. OTOH, it seems like this workaround is not needed anymore: To Reproduce wasp new wasp start Browser is blank Expected behavior so this is the issue and using this method i am not able to get any error , also i got to know that this is an error only present in the development version of Wasp Release versions are not affected so may be im using release version but im using the same method to get development version like you mentioned above but not able to get @kapa.ai
kapa.ai
kapa.ai4mo ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the information in the knowledge sources, the issue you described—where @prisma/client is an empty placeholder in CJS format when there are no models in the Prisma schema, causing problems with Vite—has been previously reported. Specifically, when no entities are defined in main.wasp, the server can crash with an error like:
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
This is because, without any models, Prisma does not generate a usable client, and the import ends up being an empty placeholder, which can cause issues in certain build tools or environments, such as Vite. The workaround at the time was to define a dummy entity in main.wasp and run wasp db migrate-dev to ensure the Prisma client is generated properly. For example:
entity Dummy {=psl
id Int @id @default(autoincrement())
psl=}
entity Dummy {=psl
id Int @id @default(autoincrement())
psl=}
Then run:
wasp db migrate-dev
wasp db migrate-dev
This would allow the app to start without the error, even if you don't actually use the entity in your app logic Server dies with Prisma error when there are no entities defined. However, as you noted, it appears that this workaround is no longer needed in recent versions of Wasp, and the issue may only be present in certain development versions, not in release versions. The knowledge sources confirm that fixes have been made in the past to address Prisma versioning and client generation issues, and that the release versions are generally more stable in this regard Migrations are broken (incompatible Prisma version?). If you are not able to reproduce the error using the current method (wasp new, wasp start), and your browser is just blank without errors, it is likely because you are using a release version of Wasp where this bug has already been fixed. The knowledge sources do not provide detailed steps for running a true "development" (from-source) version of Wasp itself, only for running Wasp apps using the released CLI. If you specifically want to test the development version of Wasp (i.e., the latest code from the main branch, not a released CLI), the knowledge sources do not contain explicit instructions for building and running Wasp from source. Therefore, I cannot provide a step-by-step guide for that scenario based on the available information. In summary:
- The bug you described has been seen in the past, but is fixed in release versions. - If you are not seeing the error, you are likely using a release version. - The knowledge sources do not provide enough information on how to run the Wasp development version from source to reproduce this bug. If you need to run Wasp from source to test development-only bugs, you may need to consult the Wasp repository's README or contributing guide for up-to-date instructions, as this is not covered in the provided knowledge sources. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @jmeena660, 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?
jmeena660
jmeena660OP4mo ago
I want to get an error. Can you tell me how I can get this error? @kapa.ai
kapa.ai
kapa.ai4mo ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the knowledge sources, the error related to @prisma/client being an empty placeholder (and causing issues with Vite or the server crashing) typically occurs when your Wasp project does not define any entities in the Prisma schema. Here’s how you can intentionally trigger this error: 1. Create a new Wasp project:
wasp new myApp
cd myApp

wasp new myApp
cd myApp

2. Do not define any entities in your main.wasp file. Make sure there are no entity blocks. 3. Start the app:
wasp start

wasp start

If you follow these steps, you should see an error similar to:
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
This error occurs because, with no entities, Prisma does not generate a usable client, and the import ends up being an empty placeholder, which can cause the server to crash or Vite to fail. This behavior is documented in the following issues: Server dies with Prisma error when there are no entities defined, Make semantics of operations' entities field more intuitive. Note:
If you are using a recent release version of Wasp, this error may have already been fixed, and you might not be able to reproduce it. The bug is more likely to appear in certain development versions of Wasp, as mentioned in your previous message and the knowledge sources. If you do not see the error, it is likely because you are on a release version where this issue has been addressed. The knowledge sources do not provide instructions for running Wasp from source to specifically test development-only bugs. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @jmeena660, 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?
toticozeni
toticozeni4mo ago
Hey @jmeena660, I suppose you did install wasp binary on your WSL? We have a guide here: https://wasp.sh/blog/2023/11/21/guide-windows-development-wasp-wsl Which repo are you cloning? You don't need to come wasp repo itself. I would recommend using wasp new to start a new project once you have it installed. Copying examples directly from the wasp repo might not work correctly, since they are on development branch. You should clone the release tag version examples instead if you want to use them.
jmeena660
jmeena660OP4mo ago
Hey, I cloned the repository using git clone https://github.com/wasp-lang/wasp.git, then created a new Wasp project using new wasp project then cd project and wasp start. However, I'm not able to reproduce the error mentioned in issue #2798. Is there a specific development version I should be using? @toticozeni
MEE6
MEE64mo ago
Wohooo @jmeena660, you just became a Waspeteer level 1!
genyus
genyus4mo ago
If you want to contribute to Wasp, then you have to follow the instructions to build and run the wasp compiler. Simply running wasp start won't use your local development instance.
jmeena660
jmeena660OP4mo ago
sure bro , thanks
Filip
Filip4mo ago
Hey @jmeena660, still need help here? @genyus linked exactly what you need to know before contriubting to Wasp (thanks again!)

Did you find this page helpful?