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

np interactive prompt exits at version selection with no output/error #605

Closed
lokimckay opened this issue Apr 1, 2021 · 7 comments
Closed

Comments

@lokimckay
Copy link

lokimckay commented Apr 1, 2021

Description

When running np without any other arguments, the process abruptly exits after it reaches the version selection stage (right after asking to continue even though there are no commits)

image

Running np with a version argument provided (e.g. np patch) works successfully with no issues

image

I have a hunch the issue is related to using Azure as a custom registry, because using the regular npm registry prompts for a version input as expected

Sorry, I cannot provide a reproduction repository because I am working with sensitive company registry and code, and don't have the access to set up a separate Azure registry

Steps to reproduce

  1. npm install --save-dev np
  2. Configure an Azure feed as the npm registry e.g.
// .npmrc
registry=https://pkgs.dev.azure.com/<organisation>/_packaging/<package name>/npm/registry/
always-auth=true
// package.json
...
"publishConfig": {
    "registry": "https://pkgs.dev.azure.com/<organisation>/_packaging/<package name>/npm/registry/"
},
  1. Authenticate with the Azure feed: see here

  2. Run npx np in terminal

Expected behavior

np interactively prompts for a version input as seen here:

image

Environment

np - 7.4.0 (note: downgrading to version 5.0.0, does not have this same issue - but has other issues related to 2fa)
Node.js - 12.21.0
npm - 6.14.11
Git - 2.30.0.windows.1
OS - Windows 10 Pro
image

@dopecodez
Copy link
Collaborator

That's actually pretty interesting, because giving the version through the prompt and through the cli should not have a Azure dependency.

Will be a tough bug to take a look at since it only seems to happen on Azure though, setting up a private repo account outside of npm might be troublesome to say the least.

@etiennejcharles
Copy link

Got the same issue - @lokimckay what did you end up doing ?

@etiennejcharles
Copy link

Did find there seems to be an authentification error of sorts - by running npx np preview

Could not pinpoint root cause yet.
image

@lokimckay
Copy link
Author

@etiennejcharles
switched to semantic release instead

@joelstransky
Copy link

joelstransky commented Jul 7, 2022

Thanks for starting this thread as I'm on azure as well. It seems np followed by any non-whitespace is what causes the interactive UI to show up. That seems like an acceptable hurdle to just alter the release script command in package.json

@joelstransky
Copy link

Thanks for starting this thread as I'm on azure as well. It seems np followed by any non-whitespace is what causes the interactive UI to show up. That seems like an acceptable hurdle to just alter the release script command in package.json

Turns out np passes the non-whitespace characters to npm version later on in the bump step which causes a failure. Seems I'm switching to semantic release as well.

@fregante
Copy link
Collaborator

fregante commented Feb 3, 2023

Tracked in #420

@fregante fregante closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2023
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