How can I change default "author" in npm?

Viewed 6354

Every time I create new npm project, there is wrong author name, can I change it?

package name: (template) template
version: (1.0.0)
description:
entry point: (index.js) bot.js
test command:
git repository:
keywords:
license: (ISC)
About to write to:

{
  "name": "template",
  "version": "1.0.0",
  "description": "",
  "main": "bot.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "*wrong author*",
  "license": "ISC"
}
1 Answers

You can run following Commond

npm config set init.author.name "your name"

or go to package.json file and edit the auther name.

 package name: (template) template
    version: (1.0.0)
    description:
    entry point: (index.js) bot.js
    test command:
    git repository:
    keywords:
    license: (ISC)
    About to write to:

    {
      "name": "template",
      "version": "1.0.0",
      "description": "",
      "main": "bot.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "author": "Rajneesh Shukla",
      "license": "ISC"
    }
Related