create-react-app 无法使用Yarn创建React应用

wwodge7n  于 5个月前  发布在  React
关注(0)|答案(1)|浏览(61)

当我尝试使用Yarn创建React应用时,我遇到了以下错误:

yarn create react-app my-app
yarn create v1.22.17
[1/4] Resolving packages...
warning create-react-app > tar-pack > tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz: unexpected end of file".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\yoav\\AppData\\Local\\Yarn\\Data\\global\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

这是日志文件:

Arguments: 
  C:\Program Files\nodejs\node.exe C:\Users\yoav\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js create react-app my-app

PATH: 
  C:\VSCode\1.51.1\bin\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Users\yoav\AppData\Roaming\npm\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\Cloud Foundry;C:\Program Files\nodejs\;C:\Users\yoav\AppData\Local\Microsoft\WindowsApps;C:\Users\yoav\.dotnet\tools;C:\Users\yoav\AppData\Local\Programs\Microsoft VS Code\bin

Yarn version: 
  1.22.17

Node version: 
  14.18.1

Platform: 
  win32 x64

Trace: 
  Error: unexpected end of file
      at Zlib.zlibOnError [as onerror] (zlib.js:187:17)

npm manifest: 
  No manifest

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile
6ju8rftf

6ju8rftf1#

这个问题已经被自动标记为过时,因为它没有任何最近的活动。如果没有发生任何进一步的活动,它将在5天后被关闭。

相关问题