Skip to content

[BUG] License is missing for all dependencies in package-lock.json #7384

@cyp-v

Description

@cyp-v

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

With any NPM version higher than 10.3.0, all of my project's dependency packages are missing their "licence" property in package-lock.json.

Packages installed with NPM v10.3.0 or below do show their licence type in package-lock.json.

Expected Behavior

The package-lock.json file should state which licence type was chosen for each of my project's dependency packages.

Steps To Reproduce

  • Cloned a Node project where all dependencies had a license type in package-lock.json;
  • Deleted package-lock.json;
  • Deleted the node_modules folder;
  • ran npm cache clean -f;
  • ran npm install

-> All "license" properties had disappeared from the project's package-lock.json.

Environment

  • npm: 10.4.0 or higher (I tried them all)
  • Node.js: 20.12.2 (LTS at this time)
  • OS Name: Windows 10
  • npm config:
; "builtin" config from C:\Users\user\AppData\Roaming\npm\node_modules\npm\npmrc

prefix = "C:\\Users\\cyp-v\\AppData\\Roaming\\npm"

; "user" config from C:\Users\cyp-v\.npmrc

//registry.[company local server]/repository/:_authToken = (protected)
registry = "http://registry.[company local server]/repository/"

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v20.12.2
; npm local prefix = C:\Users\cyp-v\git_repos\[project]
; npm version = 10.3.0
; cwd = C:\Users\cyp-v\git_repos\[project]
; HOME = C:\Users\cyp-v

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions