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

Conform.nvim Cannot find module '@vercel/style-guide/prettier' #487

Open
hakkm opened this issue Jul 4, 2024 · 3 comments
Open

Conform.nvim Cannot find module '@vercel/style-guide/prettier' #487

hakkm opened this issue Jul 4, 2024 · 3 comments
Labels
question Further information is requested

Comments

@hakkm
Copy link

hakkm commented Jul 4, 2024

I'm working on a nextjs project where I've a prettier.config.js config file,
prettier.config.js:

const styleguide = require('@vercel/style-guide/prettier');

module.exports = {
  ...styleguide,
  plugins: [...styleguide.plugins, 'prettier-plugin-tailwindcss'],
};

when i try to format it i got the following error

:ConformInfo

18:07:23[ERROR] Formatter 'prettier' error: [error] Invalid configuration for file "/home/me/projects/nextjs-dashboard/app/lib/actions.ts":
[error] Cannot find module '@vercel/style-guide/prettier'
[error] Require stack:
[error] - /home/me/projects/nextjs-dashboard/prettier.config.js

Even when i pnpm install --save-dev prettier, it do not work.
Appreciate any help.

@saifullah1088
Copy link

I am also facing the same issue my code is not formatted.

@hakkm
Copy link
Author

hakkm commented Jul 5, 2024

I am also facing the same issue my code is not formatted.

just comment lines added by vercel, if you just want it to work without vercel stuff

@stevearc
Copy link
Owner

Please follow the bug report template. It will guide you towards setting the log level to be more verbose so we can see exactly what command is being run.

The thing to do in these situations is to check what command conform is running, and see if that works when you run that directly on the command line. Usually this surfaces a problem either with the formatter, the environment, or how conform is configured to run the formatter.

@stevearc stevearc added the question Further information is requested label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants