Closed soredake closed 7 years ago
Works for me with yarn 0.17.4, node 7.1.0 and macOS 10.12.1
Still can't in 0.19.0.
it works for me with Windows 10 and yarn 0.18.1
Doesn't work for me on 0.20.3
, running Ubuntu 14.04
, Node 6.2.1
I have the same issue, macOS, everything updated.
Same issue running yarn 0.21.3 on node v7.7.2 on the linux subsystem for Windows 10.
I can remove the global package on 0.21.3 if i do cd ~/.config/yarn/global
.
maybe another package is dependent on the one you want to remove. I got a same situation when yarn global remove docsify
,then I found docsify-cli was dependent on docsify, it worked when I do yarn global remove docsify-cli
.
In my case the module had a scope, so although the binary has the same name as the package, yarn global remove module
didn't work, because I had to put the scope in it, like this: yarn global remove @scope/module
. Just like when installing (yarn global add @scope/module
).
I just had this problem, turns out it was something wrong with the yarn global manifest. I was able to delete all other modules, so my manifest got empty and now it's fixed.
Did it fixed. Running on ubuntu 16.04. I got this error
yarn global remove live-server yarn global v1.6.0 [1/2] Removing module live-server... error This module isn't specified in a manifest. info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
It still requires to have dependency specified in the manifest to remove global one.
yarn v1.7.0
my is not working node 8.11.2 yarn 1.7.0 OS linux
I encountered this error, and it was due to the executable having a different name than the module.
Specifically, yarn global remove parcel
failed but yarn global remove parcel-bundler
worked.
I had the following errors when I tried to remove google cloud functions emulator from yarn global
:
info "@google-cloud/functions-emulator@1.0.0-beta.5" has binaries:
- functions
- functions-emulator
In this case, I wasn't sure which <NAME>
I should put into yarn global remove <NAME>
.
So I just looked up at the getting started instructions on how to add it in the first place, which is yarn global add @google-cloud/functions-emulator
, then it's becomes clear that yarn global remove @google-cloud/functions-emulator
is the right solution, and it worked.
Although I have to say it was unclear to get this right immediately from the yarn
error messages.
Still having this error.
yarn global list
yarn global v1.12.3
info "@vue/cli@3.2.1" has binaries:
- vue
Done in 0.80s.
yarn global remove @vue/cli@latest
yarn global v1.12.3
[1/2] Removing module @vue/cli@latest...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
EDIT
The solution seems to be to remove the @latest
or @[Whatever version is installed]
from the package name.
@xiaodeaux doesn't work on me:
1)
$ yarn global list
Output:
yarn global v1.15.2
info "ts-node@7.0.1" has binaries:
- ts-node
✨ Done in 0.09s.
2) Remove with version
$ sudo yarn global remove ts-node@7.0.1 --force
Output:
yarn global v1.15.2
[1/2] 🗑 Removing module ts-node@7.0.1...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
3) Remove without version
$ sudo yarn global remove ts-node --force
Output:
yarn global v1.15.2
[1/2] 🗑 Removing module ts-node...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
@WuglyakBolgoink have you tried running the remove command without sudo
?
Might not help, but sometimes commands run under sudo
receive different environment variables, so might be worth a shot…
(You can also try running the list command with sudo
as another bit of debugging)
I'm experiencing this too on WIN10, yarn
v.1.15.2.
Error message:
yarn global v1.15.2
[1/2] Removing module detox...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
@tuomohopia just a guess but have you tried removing detox-cli
instead?
@hrldcpr yes, absolutely right, how silly of me to trip on that. Thanks!
I still feel the error message could be improved.
yeah it's just a bad error message.
I tried removing discify
(yarn global remove discify
) and got the message. But the actual package name of discify
is disc
. Using the real package name worked as intended :D
I'm experiencing this too on WIN10,
yarn
v.1.15.2.Error message:
yarn global v1.15.2 [1/2] Removing module detox... error This module isn't specified in a package.json file. info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
add sudo behind command and it should work sudo yarn global remove detox --force
Be sure the <name>
is correct.
For example, if you install a module by this: yarn global add @abc-scope/a-module
, you must remove it by using the same <name>
: yarn global remove @abc-scope/a-module
.
So make sure the <name>
is correct. you can check it by running yarn global list
.
Be sure the
<name>
is correct.For example, if you install a module by this:
yarn global add @abc-scope/a-module
, you must remove it by using the same<name>
:yarn global remove @abc-scope/a-module
.So make sure the
<name>
is correct. you can check it by runningyarn global list
.
You Are Right :)
It's on my Mac:
$ yarn global list
yarn global v1.22.17
info "@vue/cli@4.5.13" has binaries:
- vue
info "clipboard-cli@2.0.1" has binaries:
- clipboard
info "create-umi@0.24.1" has binaries:
- create-umi
info "gitbook-cli@2.3.2" has binaries:
- gitbook
✨ Done in 1.35s.
I tried to execute the order:
$ yarn global remove gitbook
# or
$ yarn global remove gitbook-cli@2.3.2
I got an error:
error This module isn't specified in a package.json file.
Because the real name of gitbook should be gitbook-cli
, SO:
$ yarn global remove gitbook-cli
yarn global v1.22.17
[1/2] 🗑 Removing module gitbook-cli...
[2/2] 🔨 Regenerating lockfile and installing missing dependencies...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
[-/6] ⠁ waiting...
[-/6] ⠂ waiting...
success Uninstalled packages.
✨ Done in 23.74s.
Thank You Very Much :) :) :) :)
Ooof, just realized that when you yarn global remove ts-node
and you finally end up having it removed, so that it tells you error This module isn't specified in a package.json file.
-- you can still whereis ts-node
and it tells you...
/Users/aron/.config/yarn/global/node_modules/.bin/ts-node
So you cd
into that folder and ls -la
lrwxr-xr-x 1 krymel staff 48 10 Jan 00:22 ts-node -> ../@vercel/node/node_modules/ts-node/dist/bin.js
Oh thank you, yarn
creates a symlink in cache because globally installed @vercel/node
needs it. So I still have ts-node
installed globally. If I remove it, I break @vercel/node
, if I don't, I have the wrong version installed on my machine.
What invariant of hell am I enjoying right now? Can we call that one global dependency hell
? Just for sweetening my pain? xD
Same issue in 2024 I used to love yarn. I'm beginning to hate it.
Do you want to request a feature or report a bug? bug
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce. yarn global add jpm yarn global remove jpm
What is the expected behavior? Successfully removed global package.
Please mention your node.js, yarn and operating system version. yarn v0.17.3