解决该React问题的解决方案是什么?

时间:2018-11-24 17:35:41

标签: node.js reactjs yarnpkg

当我在终端中运行npx create-react-app时会发生什么?   如果是这样,您是否仍然知道我可以解决此问题。  我需要添加更多细节。

npx create-react-app my-react-app
   npx: installed 1 in 2.024s
    The "path" argument must be of type string. Received type undefined
    C:\Users\nbatr\AppData\Roaming\npm\node_modules\create-react-app\index.js

    Creating a new React app in C:\Users\nbatr\bookmark-app\my-react-app.

        Installing packages. This might take a couple of minutes.
        (node:7828) ExperimentalWarning: The fs.promises API is experimental
    Installing react, react-dom, and react-scripts...

   yarn add v1.12.3
    (node:3716) ExperimentalWarning: The fs.promises API is experimental
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    error https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of 
         data"info Visit https://yarnpkg.com/en/docs/cli/add for documentation about 
      this 
       command.


 Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd
  C:\Users\nbatr\bookmark-app\my-react-app has failed.

  Deleting generated file... package.json
   Deleting generated file... yarn.lock
    Deleting my-react-app/ from C:\Users\nbatr\bookmark-app
    Done.

0 个答案:

没有答案