Skip to content

[BUG] warn Unknown user config "init.type". This will stop working in the next major version of npm #8905

@styfle

Description

@styfle

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

I can use npm init -y and it works but there is a warning.

Expected Behavior

No warning and future versions should continue working.

Steps To Reproduce

echo "init.type=module" >> ~/.npmrc

npm init -y

Environment

  • npm: 11.7.0
  • Node.js: v22.22.0
  • OS Name: macOS
  • System Model Name: MacBook Pro
  • npm config:
; "user" config from /Users/styfle/.npmrc

//registry.npmjs.org/:_authToken = (protected)
init.type = "module"

; node bin location = /usr/local/bin/node
; node version = v22.22.0
; npm local prefix = /Users/styfle/Code/foobar
; npm version = 11.7.0
; cwd = /Users/styfle/Code/foobar
; HOME = /Users/styfle
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions