deployment - Vercel 127 部署 Vercel 应用程序时出错

标签 deployment vercel

我正在尝试在 vercel 上部署,之前它工作正常,直到我添加了一个名为 leaflet 的 map 库,现在它在部署中出现错误。我尝试在终端中运行 npm run build 但仍然出现错误.

[10:00:20.566] Cloning github.com/daviroquedev/ride (Branch: master, Commit: 7e7d760)
[10:00:21.284] Cloning completed: 717.186ms
[10:00:21.853] Looking up build cache...
[10:00:22.163] Build Cache not found
[10:00:22.217] Running "vercel build"
[10:00:22.881] Vercel CLI 28.4.2
[10:00:23.187] Installing dependencies...
[10:00:23.831] npm ERR! must provide string spec
[10:00:23.834] 
[10:00:23.835] npm ERR! A complete log of this run can be found in:
[10:00:23.835] npm ERR!     /vercel/.npm/_logs/2022-09-27T13_00_23_618Z-debug-0.log
[10:00:23.850] Detected `package-lock.json` generated by npm 7+...
[10:00:23.850] Running "npm run build"
[10:00:24.243] 
[10:00:24.243] > <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a1d3c8c5c4e1918f918f91" rel="noreferrer noopener nofollow">[email protected]</a> build
[10:00:24.244] > vite build
[10:00:24.244] 
[10:00:24.251] sh: vite: command not found
[10:00:24.259] Error: Command "npm run build" exited with 127

构建失败 命令“npm run build”以 127 退出

PACKAGE.JSON

enter image description here

最佳答案

如果您在构建 npm 项目时遇到任何问题,尝试重新安装所有软件包始终是一个好计划。

第一步应该始终是简单地运行 npm i

如果这不起作用,请尝试删除 package-json.lock 并删除 .node_modules,然后再次运行 npm i

关于deployment - Vercel 127 部署 Vercel 应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73868105/

相关文章:

sql-server - 使用桌面应用程序部署 SQL Server Express 数据库?

java - 部署 Angular 5 Spring Boot 多模块项目-jar

通过 Java Web Start 部署 JavaFX - 加载进度条

node.js - Zeit 构建失败 - 错误 : No output directory named "build" found

reactjs - 如何解决 Vercel 上的 React Vite 404 错误

reactjs - 如何在没有 Gatsby 云的情况下使用 Gatsby 功能中的增量构建

reactjs - 如何从 Vercel 上部署的 Next.js (CRA) 应用程序的浏览器中删除源代码?

visual-studio - Visual Studio 递归复制本地

c# - 没有 DeploymentItemAttribute 的 MSTest 部署

javascript - 这是 Vercel 错误吗?找不到模块 './model'