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

Updates fail because it uses yarn instead of npm #515

Open
BenJackGill opened this issue Mar 14, 2023 · 6 comments
Open

Updates fail because it uses yarn instead of npm #515

BenJackGill opened this issue Mar 14, 2023 · 6 comments

Comments

@BenJackGill
Copy link

My @types/node package was out of date. So I ran npm-check -u and it threw this error:

$ yarn add @types/node@^18.15.3 --dev --color=always
Command failed with ENOENT: yarn add @types/node@^18.15.3 --dev --color=always
spawn yarn ENOENT
For more detail, add `--debug` to the command

It seems to be using yarn instead of npm.

How can I make it update using npm instead of yarn?

@BenJackGill BenJackGill changed the title Updates fail because it runs using are run using yarn add instead of npm update Updates fail because it runs using are run using yarn instead of npm to perform the update Mar 14, 2023
@denis-sokolov
Copy link

Try NPM_CHECK_INSTALLER=npm npm-check -u.

@BenJackGill BenJackGill changed the title Updates fail because it runs using are run using yarn instead of npm to perform the update Updates fail because it uses yarn instead of npm May 3, 2023
@lionel-bijaoui
Copy link

Why is yarn the default instead of npm for a tool called npm-check ? This is confusing and annoying as it used to work fine without NPM_CHECK_INSTALLER...

Is there at least a way to permanently make npm the default ?

@BenJackGill
Copy link
Author

@lionel-bijaoui yeah it's a weird behaviour

@manh-gntvn
Copy link

This package uses another package to detect the package manager to use: preferred-pm

Package preferred-pm is having a problem with identifying the package manager, maybe because you are using NPM Workspace?

zkochan/packages#180

@BenJackGill
Copy link
Author

BenJackGill commented Nov 15, 2023

Package preferred-pm is having a problem with identifying the package manager, maybe because you are using NPM Workspace?

I have an npm monorepo, and therefore I am using npm workspaces. So that could be it!

@kennethaasan
Copy link

I have the same issue

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

5 participants