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

ESM-only prettier plugins break @gqty/cli #1626

Closed
paolo-rossig opened this issue Mar 5, 2024 · 2 comments
Closed

ESM-only prettier plugins break @gqty/cli #1626

paolo-rossig opened this issue Mar 5, 2024 · 2 comments

Comments

@paolo-rossig
Copy link

paolo-rossig commented Mar 5, 2024

If you use a ESM-only prettier plugin, such us prettier-plugin-tailwindcss, the codegen.mjs will throw the following error:

Error [ERR_REQUIRE_ESM]: require() of ES Module .../prettier.config.js from .../node_modules/@gqty/cli/deps.js not supported.

Based on this issue, this plugin can not be loaded with require or import, just put it in the prettier.config.js file like this:

const config = {
  semi: false,
  singleQuote: true,
  plugins: ['prettier-plugin-tailwindcss']
}
export default config

Currently using:
"@gqty/cli": "4.0.0-alpha-7b21563c.0",

@vicary
Copy link
Member

vicary commented Mar 5, 2024

We have a thread in Discord about a similar issue, which the op found a workaround.
Would you mind heading there to see if it's the same case?

https://discord.com/channels/874477141834739762/1200868810434039939

@vicary
Copy link
Member

vicary commented May 4, 2024

Please feel free to reopen if the issue persists.

@vicary vicary closed this as completed May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants