np icon indicating copy to clipboard operation
np copied to clipboard

np command extremely slow

Open jonesy-b-dev opened this issue 2 years ago • 7 comments
trafficstars

Description

When i run the np command it useally takes like 3 minutes or more before something pops up on the screen. sometimes it just doesnt work at all and I have to re run it.

Why does this take so long

Steps to reproduce

  1. run the np command

Expected behavior

See Something happening quickly

Environment

np - 8.0.4 Node.js - 18.18.0 npm - 10.1.0 Git - 2.42.0 OS - Win 10 Pro 1909

jonesy-b-dev avatar Sep 27 '23 14:09 jonesy-b-dev

As I am having a similar issue, wanted to reply here just to subscribe to any other replies.

I don't necessarily mean to hop on the bandwagon - I have used np for a long time with no issues, just today it seems to be playing up but I simply have been putting this down to npm issues rather than anything to do with this package.

By 'playing up' I mean stalling on the ⠸ Publishing package using npm (waiting for input…) step, when I enter my OTP it seems to hang, hence my assumption that it is something to do with npm.

bwp91 avatar Sep 27 '23 21:09 bwp91

I noticed this too recently that np would hang for a long time when running $ np. I haven't yet figured out what causes it.

sindresorhus avatar Sep 28 '23 12:09 sindresorhus

By 'playing up' I mean stalling on the ⠸ Publishing package using npm (waiting for input…) step, when I enter my OTP it seems to hang, hence my assumption that it is something to do with npm.

This sounds like a different issue. My guess would be that the npm CLI wants input we didn't anticipate. For example, sometimes I wants you to press Space to open the browser to authenticate there. I don't think we handle that case.

sindresorhus avatar Sep 28 '23 12:09 sindresorhus

A quick fix for it is often to just restart the cmd, so it might be related to a cmd windows that had previous commands or is open for a long time. It sounds weird but I have no idea what else it could be. On a new cmd window it works always pretty quickly

jonesy-b-dev avatar Sep 29 '23 08:09 jonesy-b-dev

The issue in my case was that npm happened to be having issues at the time 😰 so no more issues on my end since :)

bwp91 avatar Sep 30 '23 19:09 bwp91

@bwp91 interesting, did you just update npm? did it got fixed after that?

jonesy-b-dev avatar Oct 01 '23 08:10 jonesy-b-dev

Wanted to use np again but it just stopped working. Was able to make a release today but after that it just didn't work. Doesn't matter how often I retry, this really should be investigated if more people have this issue

jonesy-b-dev avatar Oct 24 '23 13:10 jonesy-b-dev