Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have better error messages for TS5097: non '.ts' extension used in a query or operation ext import #2087

Open
Martinsos opened this issue Jun 7, 2024 · 3 comments
Labels
shouldfix We should do/fix this at some point

Comments

@Martinsos
Copy link
Member

This is the message I got:

image

This was caused by me specifying .ts extension in operation ext import:

action createFile {
  fn: import { createFile } from "@src/file-upload/operations.ts",
  entities: [User, File]
}

Once I removed that .ts, error went away.

But it would be hard for others to figure out this was the cause, the ext import in main.wasp.

@Martinsos Martinsos added the shouldfix We should do/fix this at some point label Jun 7, 2024
@Martinsos
Copy link
Member Author

@sodic suggest forbidding any extension in ext imports or somehow processing them by us so we allow all of them.

@Martinsos
Copy link
Member Author

Or maybe we turn on this compiler flag, if it has no bad effects.

@Martinsos
Copy link
Member Author

Sending this back to triage, this is quite an annoying error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shouldfix We should do/fix this at some point
Projects
None yet
Development

No branches or pull requests

1 participant