-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Yarn: np hangs when installed as a local devDependency #592
Comments
I thought I had the same problem on |
i've seen it hang if isPackageNameAvailable never returns. the culprit is the |
I can confirm this is the culprit. It's waiting to check if a package is available. I replaced the code in const availability = flags.publish ? await npm.isPackageNameAvailable(pkg) : {
isAvailable: false,
isUnknown: false,
}; With: const availability = {
isAvailable: true,
isUnknown: false,
} In my case it's possibly linked to the registry being a private one (using Verdaccio). I realize these may not be supported. But this did work in earlier versions of |
i worked with the dev to fix the upstream issue. should hang less often, but still relies on network connection |
I suggest adding a timeout there (e.g. reusing the |
[email protected]
seems to hang when run as a local devDependency.Description
I've installed
[email protected]
as a local devDependency.:yarn add -D np
. When runningyarn np
(with or without flags or arguments) it hangs. After minutes of waiting I have to manually terminate it.If I instead
yarn remove np
and then usenpx np
(same version ofnp
) it starts immediately.Steps to reproduce
yarn add -D [email protected]
yarn np
Expected behavior
I expect that running the local version of
np
should work immediately, like the global or npx way.Environment
np - 7.2.0
Node.js - 12.18.0
npm - 6.14.4
Git - git version 2.24.3 (Apple Git-128)
OS - macOS Catalina 10.15.7
yarn - 1.22.10
The text was updated successfully, but these errors were encountered: