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
Error when compiling with ESbuild (ESModule) #1664
Comments
@carlocorradini can you take a look? |
@cjnoname Any update? |
Hey man, esbuild-plugin-tsc is something that I used at the beginning, but it doesn't work. We also tried Rollup, but still had no luck and encountered a different error with graphql-yoga. We have given up because it seems like this package supports TypeScript ESM but doesn't support the compiled TypeScript ESM. I hope that you guys can take a few minutes to create a TypeScript ESM project with this package and try to compile it with both esbuild and Rollup. Then you'll see the issues. ESM is the future of NodeJS, and we will wait to move to ESM until your package fully supports it. It would be great if you could add an example of ESM setup that is compilable. |
I think this is not the package fault. It's the fault of 3rd party compilers that have issues with decorator metadata. |
I don't agree, bro. We've been using webpack for 7 years with CJS without any issues, same as Rollup. If the package uses the old CJS way to import the package or employs the ES5 method of exporting a module, then it won't compile correctly on ESM. ESBuild might not support decorators properly, but Rollup does support them in a great way, yet it also gets stuck on the graphql-yoga package. Additionally, I tried both and found that the typegraphql package seems to be the only one that could not be compiled across all the packages I am using. Both compilers throw errors and stop at this point. |
Describe the Bug
Error when compiling with ESbuild (ESModule)
Error details:
"Expected name to be a non-empty string."
We encountered an error while attempting to build the project with ESbuild Typescript (ESModule).
Simply add a basic resolver to the buildSchema function and you'll observe the error. You can reproduce it by following the links below. It's a straightforward setup.
https://eisenbergeffect.medium.com/an-esbuild-setup-for-typescript-3b24852479fe
https://github.com/thomaschaaf/esbuild-plugin-tsc#readme
The text was updated successfully, but these errors were encountered: