-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Custom field Typescript bindings causing compilation error #1021
Comments
Adding notes from the Slack convo:
|
I am still having this issue. Tried to create customField for Collections in a plugin:
Types:
And ending with this error: Using Vendure V.1.3.3 |
I'm having this issue again just now. I have a similar plugin definition and ambient module declaration, and I'm including the ambient module declaration by adding It used to work fine, until I added an event handler to one of the plugins, which makes use of its own custom fields. Now all my packages run Interestingly, the error appears to occur when building my 'prod-server' package, which contains the vendure config and bootstrapping files. I can avoid the error for one plugin at a time, by importing it's |
@heiko-r yes I also ran into strange and hard-to-define behaviour like this in my own project. Something to do with the interaction between extending the types in multiple locations. Have not nailed down the exact mechanics of what is going on yet. My solution has been to centralize all custom field type defs in a single file. Not so nice because they are no longer co-located with each plugin that defines them, but avoids these issues for now. |
Describe the bug
Adding typescript bindings for a custom field and using them in the plugin leads to a compilation error when running the server.
Vs-code shows no errors though.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Server should start without error
Environment (please complete the following information):
Slack conversation - https://vendure-ecommerce.slack.com/archives/CKYMF0ZTJ/p1628053404063300
The text was updated successfully, but these errors were encountered: