Node.js project with no package.json

后端 未结 3 786
面向向阳花
面向向阳花 2021-02-01 16:14

Is it ok to have a node.js project with no package.json? The ones I see on the internet all come with package.json

What is the effect of having no package.json?

3条回答
  •  礼貌的吻别
    2021-02-01 16:54

    package.json is npm file, if you don't use npm you will not have this file, npm is a great tool if you want to use external libraries in your project but if you don't need it (which is very not likely unless you are doing something very simple), you don't need package.json file too.

    To generate package.json file initialize npm in your project using npm init

提交回复
热议问题