reactjs 尝试通过从Github导入代码在Vercel上托管项目时遇到此错误

gjmwrych  于 2023-01-02  发布在  React
关注(0)|答案(1)|浏览(171)

我应该怎么做来解决这个警告,我是一个自学成才的前端开发人员,我目前正在尝试创建和主机我的第一个网页使用React

Cloning gitohub.com/Passion94/React-Apps (Branch: main, Commit: da89a2a)
Cloning completed: 729.612ms
Looking up build cache...
Build Cache not found
Running "vercel build"
Vercel CLI 28.4.12-05a80a4
Installing dependencies...
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
added 1462 packages in 36s
224 packages are looking for funding
  run `npm fund` for details
Detected `package-lock.json` generated by npm 7+...
Running "npm run build"
> my-app@0.1.0 build
> react-scripts build
Could not find a required file.
  Name: index.html
  Searched in: /vercel/path0/public
Error: Command "npm run build" exited with 1

我没有尝试过任何解决方案,在谷歌上找不到任何东西

i7uq4tfw

i7uq4tfw1#

svgo包是一个Node.js模块,用于优化SVG(可缩放矢量图形)文件。它经常用于Web开发中优化SVG图像,以获得更快的加载速度和更好的性能。
要升级到svgo包的最新版本,可以在终端npm install svgo@latest中运行以下命令

相关问题