每次创建一个新项目时,我都需要使用NPM Init吗?
我看到人们解释了npm init
对于创建package.json
文件是必要的。但是在我的最后一个练习项目中,我忘记使用npm init
和package.json
时,我使用npx create-react-react-app ...
。 /代码>
有人可以帮我理解这一点吗?
I saw people explaining that npm init
is necessary to create the package.json
file. But in my last practice project I forgot to use npm init
and the package.json
file was created when I used npx create-react-app ...
Can someone help me to understand this, please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
package.json文件是一个文件,您可以在其中指定应用程序的名称,版本,许可证应用程序所需的依赖。具有启动/运行应用程序的项目依赖项和脚本的文件。
Package.json file is a file where you specify the name of the application ,the version, the licence the dependancies the app needs etc.It is not necessary to do npm init before spinning up a new react project as it comes with a package json file that has the project dependancies and scripts to start/run the app .You can just modify the package json file that comes with the react app to fit your needs.