npm - 如何更改 npm 中的默认“作者”?
问题描述
每次新建npm项目时,作者名都写错了,可以改吗?
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"
}
解决方案
您可以按照 Commond 运行
npm config set init.author.name "your name"
或转到 package.json 文件并编辑作者名称。
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"
}
推荐阅读
- javascript - Javascript:“对象属性”实例的空构造函数名称
- python - 如何根据布尔条件更改熊猫数据框中的单元格
- python -
绑定在 tkinter 文本小部件中不起作用 - java - 使用 Logstash 编码器记录异常时如何包含 mdc 键
- css - 在 flexbox 中居中多个项目未按预期工作
- terraform - terraform 0.13.5 资源在连续调用时相互覆盖
- .htaccess - 仅 301 重定向首页
- python - RCV1 数据集上的 Bagging 分类器
- reactjs - 获取位置后如何自动导航到下一个屏幕
- reactjs - 如何最好地使用 ReactJS 中的集合更新