-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Cannot find module 'prettier' with @wordpress/eslint-plugin v3.4.0 #20027
Comments
p.s Thanks for the contribution and bonus points for the demo repo, thanks 💯 |
Hi, I'm seeing the issue again with version 4.0.0 |
Prettier is now listed as the dependency of https://unpkg.com/browse/@wordpress/[email protected]/package.json |
Hi, https://circleci.com/gh/skaut/skaut-google-drive-gallery/3451 and when I SSH into it, I can confirm npm is on version npm WARN [email protected] requires a peer of prettier@>= 1.13.0 but none is installed. You must install peer dependencies yourself.
However, locally, everything runs OK on the same branch.... Any ideas? |
I was still getting this error when "devDependencies": {
"@wordpress/babel-preset-default": "^4.10.0",
"@wordpress/scripts": "^7.1.0"
} Removing
|
I can confirm that purging My mistake, sorry. |
Describe the bug
See this example repository with the minimum setup to replicate the issue:
https://github.com/kasparsd/wordpress-eslint-plugin-prettier
Running
eslint
with.estlintrc.js
config set to:and
@wordpress/eslint-plugin
as a development dependency set to version^3.4.0
produces the following error:See the output on Travis:
https://travis-ci.com/kasparsd/wp-scripts-eslint-prettier-bug/jobs/283358536#L519-L538
Downgrading
@wordpress/eslint-plugin
to version3.3.0
fixes the problem -- see this pull request:kasparsd/wordpress-eslint-plugin-prettier#1
and the Travis CI output for the change:
https://travis-ci.com/kasparsd/wp-scripts-eslint-prettier-bug/jobs/283361201#L463-L467
To reproduce
Steps to reproduce the behavior:
git clone https://github.com/kasparsd/wordpress-eslint-plugin-prettier
npm install
npm run lint
Expected behavior
eslint
runs as expected.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: