W
Wasp3mo ago
Achilles

how do i fix this

❌ --- [Error] Your wasp project failed to compile: ------------------------------- - /projects/studyguided/main.wasp @ 30:14-19 Type error: Expected type: entity (declaration type) Actual type: string -> For dictionary field 'entities': -> In list 29 | fn: import { createNote } from "@src/actions.js", 30 | entities: ["Note"] 31 | } ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found
2 Replies
kapa.ai
kapa.ai3mo ago
Hi @real titan. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error message indicates that the entities field in your Wasp action is expecting an entity declaration type, but it received a string instead. In Wasp, when you want to specify entities that are used by actions or queries, you should provide them as a list of entity declaration types, not strings. Unfortunately, the provided knowledge sources do not contain a direct example of how to correctly declare entities in an action. However, they suggest that you might need to import the entity and use it directly, instead of providing its name as a string. If the problem persists, I recommend checking the official Wasp documentation or seeking help from the Wasp community. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @real titan, 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?
NEROX
NEROX3mo ago
you can ask again to kapa by mention it!
Want results from more Discord servers?
Add your server