[英]Facing an Error when installing create-react-app package from npm
I'm trying to install React on my Computer.我正在尝试在我的计算机上安装 React。 I'm a beginner and installing it for the first time.我是初学者,第一次安装。 However, when I used create-react-app react-app
to start a project, it showed the following:但是,当我使用create-react-app react-app
启动项目时,它显示如下:
But the app is working fine, I launched the server through npm start
and it works, so should I ignore these errors or not?但是该应用程序运行良好,我通过npm start
服务器并且它运行正常,所以我应该忽略这些错误吗?
the first warning you get ( deprecated
) means that one of the packages you are using (in this case - source-map-resolve
) was deprecated (ie is not maintained).您收到的第一个警告( deprecated
)意味着您正在使用的一个包(在本例中source-map-resolve
)已被弃用(即未维护)。 you can go to the package GitHub repo to find a way to resolve it.您可以 go 到 package GitHub repo找到解决方法。
the second error you get (cannot read properties of undefined) tells you that there is a difference between versions of global packages.您得到的第二个错误(无法读取未定义的属性)告诉您全局包的版本之间存在差异。 sometimes restarting your wifi helps it, or updating NPM/windows/node/all your packages有时重启你的 wifi 会有所帮助,或者更新 NPM/windows/node/你所有的包
run npm audit fix
and see if that helps.运行npm audit fix
,看看是否有帮助。 If not then i would just continue working on your project.如果没有,那么我将继续从事您的项目。 Since you're a beginner you will learn more about NPM as you work.由于您是初学者,您将在工作时了解有关 NPM 的更多信息。 Npm is notorious for installing a ton of dependencies that are deprecated. Npm 因安装大量已弃用的依赖项而臭名昭著。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.