简体   繁体   English

我正在尝试使用“npx/npm create-react-app hello”命令创建一个反应应用程序并得到了整个消息

[英]I am trying to create a react app using the “npx/npm create-react-app hello” command and got this whole message

when I run the following command to create a react app:当我运行以下命令来创建反应应用程序时:

C:\WINDOWS\system32> npm i create-react-app -g hello

I get the following message in cmd:我在 cmd 中收到以下消息:

npm WARN deprecated hello-config@1.0.1: Use @hello/config instead
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
C:\Users\Simran Shivani\AppData\Roaming\npm\create-react-app -> C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\create-react-app\index.js
C:\Users\Simran Shivani\AppData\Roaming\npm\hello -> C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\cli\index.js

> core-js@2.6.11 postinstall C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> ejs@2.7.4 postinstall C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\node_modules\ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm WARN glob-promise@3.4.0 requires a peer of glob@* but none is installed. You must install peer dependencies yourself.

+ create-react-app@3.4.1
+ hello@0.3.2
added 379 packages from 242 contributors in 152.381s

What am I doing wrong?我究竟做错了什么?

Your command tries to install the packages create-react-app and hello globally, If you are using npm 5.2 or later there is no reason to install create-react-app globally.您的命令尝试全局安装包create-react-apphello ,如果您使用 npm 5.2 或更高版本,则没有理由全局安装create-react-app

Use the recommended command to create your app instead,使用推荐的命令来创建您的应用程序,

npx create-react-app my-app

This command will get the latest version of create-react-app and generate your project inside a folder name my-app in your current working directory without installing create-react-app globally.此命令将获取最新版本的create-react-app并在当前工作目录中名为my-app的文件夹中生成项目,而无需全局安装create-react-app

Then you can change the working directory to my-app and start the development server by running the command npm start .然后您可以将工作目录更改为my-app并通过运行命令npm start开发服务器。

You can refer to the docs for more details.您可以参考文档以获取更多详细信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 npx create-react-app 创建应用后<myproject> ,并使用“npm start”启动应用程序我得到了下面提到的这个错误</myproject> - After creating app using npx create-react-app <myproject> , and start app by using "npm start" i got this error mentioned below 我正在使用“npx create-react-app”创建一个新的 reactjs 应用程序,当它完成并尝试使用“npm start”运行它时,我收到一个错误 - I'am creating a new reactjs application using “ npx create-react-app” , and when it's done and trying to run it using “npm start” , I get an error 无法使用 npx install 命令创建-react-app - unable to create-react-app using npx install command 尝试在 create-react-app 中导入 npm 时出错 - Error while trying to import npm got in create-react-app 无法使用 npx create-react-app myproject 命令创建反应应用程序 - not able to create react app using npx create-react-app myproject command npm 和 npx create-react-app 安装的区别 - Difference between npm and npx create-react-app installation 我可以在没有 npm 启动和 npx create-react-app 的情况下使用 React 运行 index.html 吗? - Can I run index.html with React without npm start and npx create-react-app? 我无法使用 cmd “npx create-react-app” 创建反应应用程序 - I couldn't create react app by using the cmd “npx create-react-app” npx create-react-app 命令不起作用 - npx create-react-app command does not working 命令 - 'npx create-react-app myapp' 不起作用 - the command - 'npx create-react-app myapp' does not work
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM