22 Replies
Hi @wardbox. 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 logs you've provided, it seems you're encountering a TypeScript-related issue with your Wasp project. Let's break down the problem and provide a solution:
1. First, it's important to note that you're using Wasp version 0.16.2, which is a recent version that supports TypeScript.
2. The error message suggests that the TypeScript compiler (tsc) is not available in your project.
To resolve this issue, you need to install TypeScript in your project. Here are the steps you can follow:
1. Install TypeScript as a dev dependency in your project:
2. After installing TypeScript, try running the
wasp start db
command again.
If you're still encountering issues, you might want to try the following:
1. Make sure you're using a compatible Node.js version. Wasp typically requires Node.js 18.x LTS. You're currently using Node.js v20.18.3, which might cause compatibility issues. Consider switching to Node.js 18.x using a version manager like nvm.
2. Run wasp clean
again to ensure all generated files are removed.
3. Run wasp start
to regenerate all necessary files and start your project.
If the problem persists, it might be related to how TypeScript is set up in your Wasp project. You can check the Wasp TypeScript documentation for more details on how to properly set up and use TypeScript with Wasp.
Remember, if you continue to face issues, you can always reach out to the Wasp community on their Discord channel for more specific help.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @wardbox, 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?@kapa.ai
Let me check the knowledge base for you again. One moment! :books:
----------------------
Based on the error logs you've provided, it seems you're still encountering a TypeScript-related issue with your Wasp project. The error message indicates that the TypeScript compiler (tsc) is not available in your project. Let's address this issue:
1. First, you need to install TypeScript in your project. Run the following command in your project directory:
2. After installing TypeScript, try running
wasp start
again.
If you're still facing issues after installing TypeScript, there might be a compatibility problem with the Node.js version you're using. According to the Wasp Quick Start documentation, Wasp requires Node.js version 18 or higher. You're currently using Node.js v20.18.3, which should be compatible, but it's worth noting that Wasp has only recently updated its Node.js requirements.
If the problem persists after installing TypeScript, you might want to try the following:
1. Double-check that your main.wasp
file is correctly named and formatted. The error message mentions main.wasp.ts
, which is not the standard naming convention for Wasp files. Ensure your main Wasp file is named main.wasp
(without the .ts
extension).
2. If you've made any recent changes to your Wasp configuration or TypeScript setup, review those changes to ensure they're correct.
3. You can also try running wasp compile
to see if it provides more detailed error messages about any TypeScript-related issues in your Wasp files.
If you continue to face issues, you might want to reach out to the Wasp community on their Discord channel for more specific help, as they might have encountered similar issues with recent versions of Wasp and Node.js.
Remember, Wasp is actively developed, and its compatibility with different Node.js versions and TypeScript setups may change. Always refer to the most recent documentation for the most up-to-date information.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @wardbox, 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?@kapa.ai i did run that command to install typescript
i also tried going to an older version of node
Let me check the knowledge base for you again. One moment! :books:
----------------------
Based on the error logs you've provided, it seems that the TypeScript issue is persisting despite switching to Node.js v18.18.0 and running
wasp ts-setup
. Let's try to address this issue step by step:
1. First, it's important to note that your main Wasp file seems to be named main.wasp.ts
. This is not the correct naming convention for Wasp files. Wasp files should be named main.wasp
without the .ts
extension.
2. Rename your main.wasp.ts
file to main.wasp
.
3. After renaming the file, try running wasp clean
to remove any generated files:
4. Then, run wasp start db
again:
If you're still encountering issues, let's try to manually install TypeScript in your project:
1. Navigate to your project directory in the terminal.
2. Run the following command to install TypeScript as a dev dependency:
3. After installing TypeScript, try running wasp start db
again.
If the problem persists, it might be related to how TypeScript is set up in your Wasp project. You can check the Wasp TypeScript documentation for more details on how to properly set up and use TypeScript with Wasp.
If none of these steps resolve the issue, you might want to consider creating a new Wasp project from scratch to see if the problem occurs in a fresh project. This can help isolate whether the issue is specific to your current project setup or if it's a more general problem with your Wasp installation.
Remember, if you continue to face issues, the Wasp community on their Discord channel can provide more specific help, as they might have encountered similar issues with recent versions of Wasp and TypeScript setups.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @wardbox, 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?could not figure this out, tried doing the npm install after clean with no luck
I flagged this as an issue with the TS config: https://discord.com/channels/686873244791210014/1341575371572772864/1341773607793201172
Try
wasp clean && npm install && wasp start
yea tried that, same error
Ooh. Can you share your main.wasp.ts?
ehhh im already going back to the normal main.wasp to try to get that working, running into the same issue though which is odd, thinking it might be package related
It's complaining about TS compiler errors for main.wasp?
this one
this is running
wasp db migrate-dev
after wasp clean
So for me, I found that
npm install
was required before any other operation after running wasp clean
, but if you've rolled back to main.wasp, that shouldn't still be an issueyeah it's weird lol
Might be a silly question, but you undid the changes to your tsconfig.json file as well?
yeah i reverted to this
Isn't that "include" entry one of the changes you made for the TS config?
that's for 0.15 to 0.16 afaik
i just reverted my package.json to the very first version and it's fine now :fine:
i think it was this
"wasp-config": "file:../../.local/share/wasp-lang/0.16.2/data/packages/wasp-config"
when that was in there it didn't work, when i removed it it seemed to workAh. That would be the result of the
wasp ts-setup
command, which would also need to be removed if you're reverting back to the conventional setup. Well, glad you have everything working againit also involved removing
"tsc": "^2.0.4",
from package.jsonOh, that was kapa trying to be helpful, but actually making things worse 😅
@sodic one for you