W
Wasp4mo ago
robot@kk

Cannot find module 'wasp/server/email' or its corresponding type declarations.

I encountered this problem and don't understand why.
No description
3 Replies
kapa.ai
kapa.ai4mo ago
Hi @robot@kk. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- This error typically occurs when the Wasp compiler hasn't generated the necessary files or when there's an issue with the project setup. Here are a few potential reasons and solutions for this problem: 1. Outdated Wasp version: Make sure you're using the latest version of Wasp. The wasp/server/email module might be available only in newer versions. 2. Incomplete compilation: Try running wasp start to ensure that Wasp compiles all the necessary files, including the SDK packages like wasp/server/email. 3. Incorrect import path: Double-check that you're using the correct import path. According to the Wasp documentation on sending emails, the correct import should be:
import { emailSender } from "wasp/server/email";

import { emailSender } from "wasp/server/email";

4. Project structure issues: Ensure that your project structure is correct and that you're working in the right directory. If the problem persists after trying these steps, you can try the following: 1. Run wasp clean to delete all generated files and node_modules. 2. Then run wasp start again to reinstall and recompile everything. If you're still encountering issues, it might be helpful to share more details about your project setup, Wasp version, and the specific file where you're trying to use this import. Discord support thread: Missing "./auth/email" specifier in "wasp" package suggests that there might have been changes in import paths in recent Wasp versions. If you've recently upgraded Wasp, you might need to update your import paths accordingly. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @robot@kk, 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?
robot@kk
robot@kkOP4mo ago
It's not just "wasp/server/email", it's every wasp
miho
miho4mo ago
Did you run wasp start?

Did you find this page helpful?