Skip to content

[BUG] Npm view command issue when private registry return manifest short version #8132

Closed
@aleDVirgo

Description

@aleDVirgo

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

We noticed that from npm version 11 we have issue with the view command, the code referenced below doesn't check for time existence property in the manifest output.

const aTime = aTag === 'latest' ? Infinity : Date.parse(packu.time[aVer])

However the time property doesn't exist if the manifest is in the short version, resulting in a null pointer (variable is undefined). Downgrading to latest v10 solves the issue

Expected Behavior

It should print package info

Steps To Reproduce

  1. Setup a private registry
  2. Run npm show or npm view of a package with the private scope

Environment

  • npm: 11.1.0
  • Node.js: 23.8.0
  • OS Name: Arch Linux
  • System Model Name: Dell latitude
  • npm config:
; copy and paste output from `npm config ls` here
; "user" config from /home/ale/.npmrc

@middleware:registry = "https://gitlab.dvtech.io/api/v4/projects/3928/packages/npm/"
//gitlab.dvtech.io/api/v4/projects/3928/packages/npm/:_authToken = (protected)

; "env" config from environment

prefix = "/home/ale/.local"

; node bin location = /usr/bin/node
; node version = v23.8.0
; npm local prefix = /home/ale
; npm version = 11.1.0
; cwd = /home/ale
; HOME = /home/ale

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions