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

Doesn't work with prettier-atom #3

Open
marcofugaro opened this issue Mar 28, 2018 · 4 comments
Open

Doesn't work with prettier-atom #3

marcofugaro opened this issue Mar 28, 2018 · 4 comments

Comments

@marcofugaro
Copy link

Hey, first congrats on this project, it's awesome!

I wanted to try it with prettier-atom since it runs prettier on the file save, but it's not working, I'm getting this error even after having installed the dependency.

image

Any way it could work with the atom editor?

@tmcw
Copy link
Contributor

tmcw commented Mar 28, 2018

My first guess would be - does your project have prettier as a dependency, or are you relying on the copy of prettier bundled with prettier-atom? If prettier isn't a dependency of the project, the path ./node_modules... will be likely be resolved relative to the atom plugin, rather than the project's root.

@marcofugaro
Copy link
Author

@tmcw yes, the project has a .prettierrc, prettier as a devDependency, and a prettier script in the package.json's scripts

@tmcw
Copy link
Contributor

tmcw commented Jul 10, 2018

Try using an absolute path to the configuration instead of a relative one?

@marcofugaro
Copy link
Author

Hey it works that way!

Sadly we can't commit that to the project's .prettierrc, it would be great it every editor could read from it.

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