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

Plugin stuck on "Ready-to-install package ... Just run your package manager install command." #20

Closed
paul-uz opened this issue Mar 22, 2023 · 18 comments · May be fixed by #22
Closed

Plugin stuck on "Ready-to-install package ... Just run your package manager install command." #20

paul-uz opened this issue Mar 22, 2023 · 18 comments · May be fixed by #22

Comments

@paul-uz
Copy link

paul-uz commented Mar 22, 2023

The plugin correctly detects out dated versions, and updates the number when I click to do so. It then prompts with a message like:

Ready-to-install package "@types/aws-lambda" at version 8.10.114. Just run your package manager install command.

So, I run npm i and the update is installed. However, the plugin continues to persist the "Ready-to-install" message.

I'm using v2.2.0 and VS Code 1.76.2 on MacOS 11.6.5

@rentalhost
Copy link
Collaborator

Thanks for reporting.

I have three questions:

  1. What is displayed to console when you click on "do it for me" button? Or maybe you are running npm i directly?

  2. Are you using in fact npm i or other package manager? Your project contains yarn.lock or pnpm-lock.yml files?

  3. When you reload vscode it is fixed or the message of "ready to install" still exists?

Thanks!

@paul-uz
Copy link
Author

paul-uz commented Mar 24, 2023

  1. Yes, I'm running npm i myself. I don't see a "do it for me" button
    1. Yes, using npm
  2. Reloading VSCode doesn't fix the issue. I even reinstalled the extension, same issue

Oddly, it seems to work, a bit. See screenshot below. Moment is flagged OK, but util-dynamodb is still saying to un the install command, even though I have.

Screenshot 2023-03-24 at 09 22 27

@rentalhost
Copy link
Collaborator

Would it be feasible for you to delete the "node_modules" folder and run "npm i" again? I suspect it's some defect within node_modules that may be causing problems (this usually happens after many updates to npm itself, or when using other package managers).

@backtoyoujames
Copy link

I too am experiencing this issue which seemed to appear pretty recently as one of the projects wasn't showing the ''now run your package manager." message but now it is that project and another one I just created. There aren't any error indicators in the vscode output window so it's not clear what's going on.

I have updated vscode a few times so perhaps it's related?
VSCode Version: 1.78.1

@rentalhost
Copy link
Collaborator

@backtoyoujames I suspect this problem is related to the missing file package-lock.json, which would only be created after npm install. And since the file doesn't exist and the extension is watching this file for "modifications" (and not for "creation", too), it fails to update the diagnostics and it will always display "now run your package manager" (closing and opening vscode should do the trick).

Another related issue is if you are using pnpm or yarn, which are currently not supported.

However, PR #22 should resolve the first case and add support for pnpm. yarn is not yet supported.

@rentalhost rentalhost linked a pull request May 10, 2023 that will close this issue
@paul-uz
Copy link
Author

paul-uz commented May 10, 2023

I'm still having this issue despite having a package-lock.json file and using npm.

@rentalhost
Copy link
Collaborator

@paul-uz Restarting vscode the problem persists? You can create a reduced case for I test?

@paul-uz
Copy link
Author

paul-uz commented May 10, 2023

@paul-uz Restarting vscode the problem persists? You can create a reduced case for I test?

Yup restarted VSCode several times, same thing every time.

@rentalhost
Copy link
Collaborator

@paul-uz It's a little weird. Can you create a reduced project? Maybe only package.json could help to understand. But if you could generate a reduced project it would help more. So I can see if PR is the solution or even improve it.

@ImUrX
Copy link

ImUrX commented Jul 1, 2023

I have this happen on npm workspaces!

@ImUrX
Copy link

ImUrX commented Jul 1, 2023

The main package.json doesnt have this error but any inner package.json keeps saying this :p

@rentalhost
Copy link
Collaborator

The main package.json doesnt have this error but any inner package.json keeps saying this :p

You have package.json in a non-root path? Maybe this need to be fixed, because I never do in that way. I will check in this week.

@paul-uz
Copy link
Author

paul-uz commented Jul 2, 2023

The main package.json doesnt have this error but any inner package.json keeps saying this :p

You have package.json in a non-root path? Maybe this need to be fixed, because I never do in that way. I will check in this week.

It's quite a common thing with a monorepo

@mmospanenko
Copy link

maybe we can turn it off?

@rentalhost
Copy link
Collaborator

Must be fixed now via #22.

@ImUrX
Copy link

ImUrX commented Jul 13, 2023

but it still isnt merged 😔

@rentalhost
Copy link
Collaborator

Yeah, I just asked @mskelton if he will approves the PR.

@rentalhost
Copy link
Collaborator

I have published a fork extension called npm-outdated-plus with this changes.

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

Successfully merging a pull request may close this issue.

5 participants