【发布时间】:2022-12-30 02:50:56
【问题描述】:
我应该怎么做才能解决此警告,我是一名自学成才的前端开发人员,目前我正在尝试使用 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
我没有尝试过任何解决方案,无法在 Google 上找到任何内容
【问题讨论】:
-
gitohub.com?真的吗? -
npm run build是否在您的本地计算机上干净地执行?该命令在您的包.json? -
您是否查看过此答案? stackoverflow.com/a/57371378/1024832
标签: javascript reactjs github frontend vercel