当前位置: 首页 > 知识库问答 >
问题:

如何解决创建react应用程序的问题?

田彬郁
2023-03-14

我尝试用npx create-react-app projectreact创建react app。它给了我以下错误:

PS C:\Users\ahnaa\OneDrive\Documents\Web Developent\Reaact JS> npx create-react-app projectreact

Creating a new React app in C:\Users\ahnaa\OneDrive\Documents\Web Developent\Reaact JS\projectreact.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...


> core-js@2.6.11 postinstall C:\Users\ahnaa\OneDrive\Documents\Web Developent\Reaact JS\projectreact\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.5 postinstall C:\Users\ahnaa\OneDrive\Documents\Web Developent\Reaact JS\projectreact\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.5 postinstall C:\Users\ahnaa\OneDrive\Documents\Web Developent\Reaact JS\projectreact\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

+ react@16.13.1
+ react-scripts@3.4.1
+ react-dom@16.13.1
added 1625 packages from 750 contributors and audited 1629 packages in 531.566s

59 packages are looking for funding
run `npm fund` for details

found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
The system cannot find the path specified.

共有1个答案

卢和昶
2023-03-14
npm uninstall -g create-react-app

那就试试跑吧

npx create-react-app projectreact
 类似资料:
  • PS C:\用户\HP\桌面 安装软件包。这可能需要几分钟。使用cra-模板安装react-dom和react-script…… npm错误!代码ERR_SOCKET_TIMEOUT npm ERR!errno ERR_SOCKET_TIMEOUT npm ERR!对https://registry.npmjs.org/bfj的请求失败,原因:套接字超时 npm ERR!此运行的完整日志可在以下文

  • 会导致以下依赖项错误: npx版本:8.5.0 该命令仍会生成一个项目目录,但在创建的目录中运行,并且

  • 我已安装appium 1.3.3版。 我已启动appium服务器以检查ios应用程序。 我已附上屏幕截图以供参考。 我收到下面提到的错误消息。

  • 所以,基本上,每次我使用npx、npm或Thread(已经全部试用过)运行create react应用程序,同时使用NodeJS 12、NodeJS 16.3.0和npm 7.15(或类似的东西),它都会给我带来多个依赖漏洞。使用最新版本的npm和nodeJS,我得到了24个(11个中等,13个高)。如何解决这些依赖关系?还是可以忽略它们。我希望最终在生产模式下使用建议的应用程序,但我一辈子都不知

  • 我试图在我的Ionic Angular应用程序中执行以下函数,cloudFunctionUrl是我在firebase项目中的一个云函数: 为了解决CORS问题,我安装了允许CORS:Access-Control-Allow-Origin chrome插件。以下是白名单域的列表: null 我遇到了两个问题: null 有人能告诉我怎么解决这件事吗? 我也尝试将下面的头添加到请求中,但错误仍在出现:

  • 我没有做任何更改,我只是运行“CreateReact应用程序客户端”,然后一切正常运行,我将cd放入目录并运行“ThreadStart”。然后我有两个问题:1)它说“有些东西已经在3000端口上运行了”。不幸的是,当我使用lsof和netstat时,端口3000上没有运行任何东西。我说在不同的端口上运行,然后它会尝试为应用程序提供服务。2) 新港口没有提供任何服务。浏览器将打开,控制台不会给出任何