简体   繁体   English

我无法创建 React 项目

[英]I can not create a React project

I started learning React.js and when I type in the command line npx create-react-app {name of project} it starts downloading the dependencies but at the end I get an error with yargs-parser being a low level vulnerability, I've tried updating the package, deleting the project and creating one again, reinstalling node.js and still doesn't work, besides I've seen in all tutorials that in the initial setup after creating a react project I should have more folders than those that I have, cause I only have the folder: node_modules and the files: package.json, package-lock.json , no public folder and from src I have only the.json files I mentioned earlier, I would appreciate if somebody could help with this problem :/ .我开始学习 React.js,当我输入命令行 npx npx create-react-app {name of project}时,它开始下载依赖项,但最后我收到一个错误, yargs-parser是一个低级漏洞,我我尝试更新 package,删除项目并再次创建一个,重新安装 node.js 并且仍然无法正常工作,此外我在所有教程中看到,在创建反应项目后的初始设置中,我应该拥有比我更多的文件夹have, cause I only have the folder: node_modules and the files: package.json, package-lock.json , no public folder and from src I have only the.json files I mentioned earlier, I would appreciate if somebody could help with this问题:/

npx create-react-app {project name} outputs: npx create-react-app {project name}输出:

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

npm audit outputs: npm audit输出:

Low Prototype Pollution低原型污染

Package yargs-parser Package yargs-parser

Patched in >=13.1.2 <14.0.0 ||修补在 >=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=15.0.1 <16.0.0 || >=18.1.2 >=18.1.2

Dependency of react-scripts react-scripts 的依赖

Path react-scripts > webpack-dev-server > yargs > yargs-parse路径 react-scripts > webpack-dev-server > yargs > yargs-parse

More info https://npmjs.com/advisories/1500更多信息https://npmjs.com/advisories/1500

After trying reinstalling node, cleaning npm cache, deleting node folders on ProgramFiles, trying creating a project with yarn create react-app , the only thing that worked for me was to install nodejs for Windows x86.在尝试重新安装节点,清理 npm 缓存,删除 ProgramFiles 上的节点文件夹,尝试使用yarn create react-app创建项目后,唯一对我有用的是为 Windows Z8A9DA7865483C2D359F3ACEF17 安装 nodejs。

OS: Windows 10 x64操作系统:Windows 10 x64

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM