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

[Bug]: Install command is installing prettier v2.8.8 #257

Closed
ryanmortier opened this issue Dec 6, 2023 · 4 comments
Closed

[Bug]: Install command is installing prettier v2.8.8 #257

ryanmortier opened this issue Dec 6, 2023 · 4 comments
Assignees
Labels
bug Something isn't working Stale

Comments

@ryanmortier
Copy link

ryanmortier commented Dec 6, 2023

Description

This is the weirdest thing and I have no idea if this is a bug with npm or this repo's dependencies or something and this seems like it might be related to #230.

If you install this plugin with the following command npm install --save-dev @shufo/prettier-plugin-blade prettier as listed on the readme, then prettier v2.8.8 is installed for some reason. I've reproduced this in fresh new projects.

Steps to reproduce:

Here is a new project with nothing installed via npm (nls is aliased to npm list --depth=0):

➜ nls
laravel@ /Users/ryan/Code/laravel
└── (empty)
➜ npm install --save-dev @shufo/prettier-plugin-blade prettier

added 184 packages, and audited 185 packages in 4s

37 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
➜ nls
laravel@ /Users/ryan/Code/laravel
├── @shufo/prettier-plugin-blade@1.13.4
└── prettier@2.8.8
➜ npm uninstall @shufo/prettier-plugin-blade prettier

removed 184 packages, and audited 1 package in 528ms

found 0 vulnerabilities
➜ nls
laravel@ /Users/ryan/Code/laravel
└── (empty)
➜ npm install --save-dev prettier

added 1 package, and audited 2 packages in 303ms

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
➜ nls
laravel@ /Users/ryan/Code/laravel
└── prettier@3.1.0
➜ npm install --save-dev @shufo/prettier-plugin-blade

added 184 packages, and audited 186 packages in 3s

38 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
➜ nls
laravel@ /Users/ryan/Code/laravel
├── @shufo/prettier-plugin-blade@1.13.4
└── prettier@3.1.0

Also, it doesn't matter if I install this plugin first or prettier first, as long as I install one at a time, I get prettier@3.1.0. If both are in the same line during install, I get prettier@2.8.8.

Expected Behavior

Should install prettier@3.1.0.

Actual Behavior

Installs prettier@2.8.8.

Additional Context

node v21.3.0
npm v10.2.4

@ryanmortier ryanmortier added the bug Something isn't working label Dec 6, 2023
@ryanmortier
Copy link
Author

Perhaps it has something to do with the yarn.lock file?

CleanShot 2023-12-06 at 12 19 53

Does npm look that this file when installing?

Copy link
Contributor

github-actions bot commented Feb 5, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Feb 5, 2024
@shufo shufo removed the Stale label Feb 5, 2024
@shufo
Copy link
Owner

shufo commented Feb 5, 2024

Sorry for delay, now working on upgrade to prettier to v3!

Copy link
Contributor

github-actions bot commented Apr 6, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Apr 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants