无法运行我下载的反应模板

问题描述 投票:0回答:1

我已经下载了一个 React 模板并想要对其进行自定义。我已经放置了节点模块文件夹,当我运行 npm run start 命令时,出现以下错误

npm 错误!代码 ENOENT npm 错误!系统调用打开 npm 错误!路径 C:\Users\hp\Desktop\ReactIntroduction\material-kit-react-main\pack 年龄.json npm 错误!错误号-4058 npm 错误! enoent 无法读取 package.json:错误:ENOENT:没有这样的文件或可怕的 工厂,打开 'C:\Users\hp\Desktop\ReactIntroduction\material-kit-react-main\packa ge.json' npm 错误! enoent 这与 npm 找不到文件有关。 npm 错误!显着

reactjs npm npm-scripts
1个回答
0
投票

看起来“material-kit-react-main”文件夹中没有名为“package.json”的文件。 我假设您从 https://github.com/creativetimofficial/material-kit-react.git 下载文件,您将获得一个名为“material-kit-react-main.zip”的 zip 文件。

  1. 解压存档文件,您将得到一个名为“material-kit-react-main”的文件夹。
  2. 进入名为“material-kit-react-main”的文件夹,你会看到有很多文件,包括“package.json”。
  3. 运行“npm install”命令来安装依赖项。
  4. 运行“npm start”命令启动项目。
© www.soinside.com 2019 - 2024. All rights reserved.