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

[BUG] Package fails to publish with OTP on npm@10.8.0 #7547

Closed
2 tasks done
mikeseese opened this issue May 21, 2024 · 4 comments
Closed
2 tasks done

[BUG] Package fails to publish with OTP on npm@10.8.0 #7547

mikeseese opened this issue May 21, 2024 · 4 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@mikeseese
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

When I run npm publish, after I successfully provide the OTP in the browser, the NPM CLI errors with:

400 Bad Request - PUT https://registry.npmjs.org/@incanta%2fconfig - child "otp" fails because ["otp" with value "[object Object]" fails to match the required pattern: /^\d+$/, "otp" length must be 64 characters long]

Downgrading to npm@10.7.0 publishes the update without any issue.

Expected Behavior

The package should publish without error.

Steps To Reproduce

  1. Use the latest NPM npm i -g npm@10.8.0
  2. Clone https://github.com/incanta/node-config
  3. Install yarn v1 npm i -g yarn
  4. Install deps: yarn
  5. Build TypeScript: yarn build
  6. Change the package.json package name so you can publish it
  7. Publish: npm publish
  8. Provide OTP in browser
  9. Return to CLI to see the version
  10. See the error in the CLI

Repeat these steps after downgrading NPM npm i -g npm@10.7.0 to see that you can publish.

Environment

  • npm: 10.8.0
  • Node.js: 20.13.1
  • OS Name: Windows 11 Pro
  • System Model Name: Custom built desktop PC
  • npm config:
; "user" config from C:\Users\seese\.npmrc

@fortawesome:registry = "https://npm.fontawesome.com/"
//npm.fontawesome.com/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
msbuild_path = "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\MSBuild.exe"
msvs_version = "2022"

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v20.13.1
; npm local prefix = D:\work\node-config
; npm version = 10.7.0
; cwd = D:\work\node-config
; HOME = C:\Users\seese
; Run `npm config ls -l` to show all defaults.
@mikeseese mikeseese added Bug thing that needs fixing Needs Triage needs review for next steps labels May 21, 2024
@fsegurai
Copy link

fsegurai commented May 21, 2024

Same issue here, downgrading to 10.7.0 did the trick. No issues so far.

Issue is with 10.8.0

@wraithgar
Copy link
Member

wraithgar commented May 23, 2024

This was fixed in #7545

@andrewangelle
Copy link

This was fixed in #7545

No it wasnt

@mikeseese
Copy link
Author

mikeseese commented Jun 24, 2024

@andrewangelle I can confirm that 10.8.1 did fix this issue. Make sure you have the latest version of npm: npm i -g npm and check npm --version is 10.8.1 (latest) or higher. If you're still having issues, please open a new GH issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

4 participants