0

I installed node, then I ran npm install create-react-app, then ran npx create-react-app hello-world.

The last command did not go through because of some package funding, whatever that means.

How do I fix this?

I am using windows. Here is how my command prompt looks like:

command prompt

4

2 回答 2

0

当您执行“npm install create-react-app”时,您将在当前文件夹中安装 CLI,以简化为您的项目创建 React 模板。执行“npx create-react-app hello-world”是多余的,因为您已经下载了 create-react-app 模块,如果您不想保存 CLI 软件而只创建模板,那么这是一种更好的方法。

使用“-g”标志将允许您全局使用 CLI 在您的计算机上创建 React 项目(“npm install -g create-react-app”这可能需要某些权限),而不仅仅是您所在的特定文件夹.

完成后,您必须使用命令“create-react-app 'your_project_name'”来使用 create-react-app 创建项目。更多信息在这里https://reactjs.org/docs/create-a-new-react-app.html#create-react-app,启动项目只需进入创建的文件夹并执行“npm start”。

寻求资金的软件包正是它所说的,这些模块的开发人员正在寻找资金。

于 2020-05-31T19:51:18.777 回答
0

卸载 x64 版本的节点并安装 x34 版本解决了我同样的问题。

于 2020-12-13T14:33:57.567 回答