官方文档指南:https://docs.npmjs.com/files/package.json

main 属性

如果不填的话,默认是找文件夹根目录下的index

The main field is a module ID that is the primary entry point to your program. That is, if your package is named foo, and a user installs it, and then does require("foo"), then your main module’s exports object will be returned.

This should be a module ID relative to the root of your package folder.

For most modules, it makes the most sense to have a main script and often not much else.

中文字符

  • Package.json 里面不要出现中文,不然会出现解析错误
  • 项目标题不要大写字母,要全小写