在NetLify上部署期间失败了错误:构建脚本返回非零退出代码:2

发布于 2025-02-10 16:27:12 字数 5110 浏览 2 评论 0 原文

12:02:27 PM:准备开始 12:02:29 PM:构建图像版本:A49EDBC55FC722F80F6B85963A5060F8D043A844(焦点) 12:02:29 PM:构建图像标签:v4.8.1 12:02:29 PM:BuildBot版本:3EEBC38122EFAB6C175DF9862763278079354A6 12:02:29 pm:获取缓存的依赖关系 12:02:29 pm:无法获取缓存,继续进行构建 12:02:29 pm:开始准备构建存储库 12:02:29 PM:找不到缓存的依赖关系。克隆新鲜仓库 12:02:29 pm:git克隆 12:02:30 pm:准备GIT参考参考/头/主 12:02:30 pm:解析软件包。 12:02:31 pm:开始构建脚本 12:02:31 pm:安装依赖项 12:02:31 PM:Python版本设置为2.7 12:02:32 PM:V16.15.1已经安装。 12:02:32 PM:现在使用节点V16.15.1(NPM V8.11.0) 12:02:32 PM:开始恢复缓存的构建插件 12:02:32 pm:完成的恢复缓存的构建插件 12:02:32 PM:尝试Ruby 2.7.2版,从环境中阅读 12:02:33 PM:使用Ruby 2.7.2版 12:02:33 PM:使用PHP版本8.0 12:02:34 pm:未检测到NPM工作区 12:02:34 pm:开始恢复加速节点模块 12:02:34 pm:完成的恢复缓存节点模块 12:02:34 PM:使用NPM版本8.11.0安装NPM模块 12:02:34 pm:NPM警告配置TMP此设置不再使用。 NPM将临时文件存储在特殊 12:02:34 pm:NPM Warn warn配置位置在缓存中,它们由 12:02:34 pm:npm warn config cacache 。 12:02:34 pm:NPM警告配置TMP此设置不再使用。 NPM将临时文件存储在特殊 12:02:34 pm:NPM Warn warn配置位置在缓存中,它们由 12:02:34 pm:npm warn config cacache 。 12:02:40 pm:添加了309个软件包,并在6s中审核了310个包裹 12:02:40 pm:126个包裹正在寻找资金 12:02:40 PM:运行 NPM Fund 有关详细信息 12:02:40 PM:发现0漏洞 12:02:40 pm:安装了NPM模块 12:02:41 PM:NPM警告Config TMP此设置不再使用。 NPM将临时文件存储在特殊 12:02:41 pm:NPM Warn warn配置位置在缓存中,它们由 12:02:41 PM:NPM WARN配置 cacache 。 12:02:41 PM:开始恢复缓存GO CACH 12:02:41 pm:完成恢复缓存的GO缓存 12:02:41 PM:安装GO版本1.16.5(请求1.16.5) 12:02:45 PM:Unset Goos; 12:02:45 PM:Unset Goarch; 12:02:45 PM:导出Goroot ='/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64'; 12:02:45 pm:导出路径=“/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64/bin:$ {path}”; 12:02:45 pm:Go版本>& 2; 12:02:45 PM:导出gimme_env =“/opt/opt/buildhome/.gimme/env/go1.16.5.linux.amd64.env” 12:02:45 PM:GO版本GO1.16.5 Linux/AMD64 12:02:45 PM:安装缺失命令 12:02:45 PM:验证运行目录 下午12:02:46: 12:02:46 pm:─-─-─-─-─杏仁 - ─-─-─-─-─-─-─-─-─-─-─-─-─杏仁 - ─-─-─-─-─-─-─- - ─-─-─-─-─- - ─- - ─-─-─- ────-─-─-─达队 - ─达队 - ─-─-─达c-─-─- 12:02:46 pm:Netlify Build
12:02:46 pm:─-─-─-─-─杏仁 - ─-─-─-─-─-─-─-─-─-─-─-─-─杏仁 - ─-─-─-─-─-─-─- - ─-─-─-─-─- - ─- - ─-─-─- ────-─-─-─达队 - ─达队 - ─-─-─达c-─-─- 下午12:02:46: 12:02:46 pm:❯版本 12:02:46 pm: @netlify/build 27.1.6 下午12:02:46: 12:02:46 pm:❯旗帜 12:02:46 pm:basereldir:是的 12:02:46 PM:BuildID:62B55A7B9B455140F8881BCFD 12:02:46 PM:DeployID:62B55A7B9B455140F881BCFF 下午12:02:46: 12:02:46 pm:❯当前目录 12:02:46 pm:/opt/build/repo 下午12:02:46: 12:02:46 pm:❯配置文件 12:02:46 pm:未定义配置文件:使用默认值。 下午12:02:46: 12:02:46 pm:❯上下文 下午12:02:46:生产 下午12:02:46: 12:02:46 pm:─-─-─-─-─杏仁 - ─-─-─-─-─-─-─-─-─-─-─-─-─杏仁 - ─-─-─-─-─-─-─- - ─-─-─-─-─- - ─- - ─-─-─- ────-─-─-─达队 - ─达队 - ─-─-─达c-─-─- 12:02:46 pm:1。从Netlify App
构建命令 12:02:46 pm:─-─-─-─-─杏仁 - ─-─-─-─-─-─-─-─-─-─-─-─-─杏仁 - ─-─-─-─-─-─-─- - ─-─-─-─-─- - ─- - ─-─-─- ────-─-─-─达队 - ─达队 - ─-─-─达c-─-─- 下午12:02:46: 12:02:46 pm:$ npm运行构建 12:02:47 pm:NPM警告配置TMP此设置不再使用。 NPM将临时文件存储在特殊 12:02:47 pm:NPM Warn warn配置位置在缓存中,它们由 12:02:47 PM:NPM WARN配置 cacache 。 下午12:02:47:> 下午12:02:47:> TSC&& Vite build 12:02:47 PM:SH:1:TSC:找不到 下午12:02:47: 12:02:47 pm:─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─- - ─- - ─- ────-─-─-─达队 - ─达队 - ─-─-─达c-─-─- 12:02:47 pm:“ build.command”失败
12:02:47 pm:─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─-─- - ─- - ─- ────-─-─-─达队 - ─达队 - ─-─-─达c-─-─- 下午12:02:47: 12:02:47 PM:错误消息 12:02:47 pm:命令失败,出口代码127:npm run构建(
https:// ntl。仅供参考/exit-code-127 ) 下午12:02:47: 12:02:47 PM:错误位置 12:02:47 PM:在NetLify App的构建命令中: 12:02:47 PM:NPM运行构建 下午12:02:47: 12:02:47 PM:已解决的配置 下午12:02:47:建造: 12:02:47 pm:命令:NPM运行构建 12:02:47 PM:Commandorigin:UI 下午12:02:47:环境: 12:02:48 pm:创建部署上传记录 下午12:02:47:-CI 12:02:47 pm:发布:/opt/opt/build/repo/dist 12:02:47 PM:Publishorigin:UI 12:02:49 pm:舞台“建筑站点”期间失败:构建脚本返回非零退出代码:2( https://ntl.fyi/exit-code-2 ) 12:02:47 PM:缓存工件 12:02:47 PM:开始保存节点模块 12:02:47 PM:完成保存节点模块 12:02:47 PM:开始保存构建插件 12:02:47 PM:完成保存构建插件 12:02:47 PM:开始节省PIP缓存 12:02:47 PM:完成保存PIP缓存 12:02:47 PM:开始拯救Emacs Cask依赖 12:02:47 PM:完成保存Emacs Cask依赖关系 12:02:47 PM:开始保存Maven依赖 12:02:47 PM:完成保存的Maven依赖关系 12:02:47 PM:开始保存启动依赖性 12:02:47 pm:完成保存启动依赖性 12:02:47 PM:开始节省Rustup Cache Rustup Cache 12:02:47 PM:完成保存Rustup Cache 12:02:47 pm:开始节省依赖 12:02:47 PM:完成保存的GO依赖关系 12:02:48 pm:由于用户错误而导致构建失败:构建脚本返回非零退出代码:2 12:02:48 PM:构建失败:无法构建网站 12:02:49 PM:完成的处理构建请求在20.062966026S

12:02:27 PM: Build ready to start
12:02:29 PM: build-image version: a49edbc55fc722f80f6b85963a5060f8d043a844 (focal)
12:02:29 PM: build-image tag: v4.8.1
12:02:29 PM: buildbot version: 3eebc38122efab6c175df98627632780779354a6
12:02:29 PM: Fetching cached dependencies
12:02:29 PM: Failed to fetch cache, continuing with build
12:02:29 PM: Starting to prepare the repo for build
12:02:29 PM: No cached dependencies found. Cloning fresh repo
12:02:29 PM: git clone https://github.com/Uvais-khan078/app-codeyogi-clone-typescript
12:02:30 PM: Preparing Git Reference refs/heads/main
12:02:30 PM: Parsing package.json dependencies
12:02:31 PM: Starting build script
12:02:31 PM: Installing dependencies
12:02:31 PM: Python version set to 2.7
12:02:32 PM: v16.15.1 is already installed.
12:02:32 PM: Now using node v16.15.1 (npm v8.11.0)
12:02:32 PM: Started restoring cached build plugins
12:02:32 PM: Finished restoring cached build plugins
12:02:32 PM: Attempting ruby version 2.7.2, read from environment
12:02:33 PM: Using ruby version 2.7.2
12:02:33 PM: Using PHP version 8.0
12:02:34 PM: No npm workspaces detected
12:02:34 PM: Started restoring cached node modules
12:02:34 PM: Finished restoring cached node modules
12:02:34 PM: Installing NPM modules using NPM version 8.11.0
12:02:34 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:02:34 PM: npm WARN config location in the cache, and they are managed by
12:02:34 PM: npm WARN config cacache.
12:02:34 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:02:34 PM: npm WARN config location in the cache, and they are managed by
12:02:34 PM: npm WARN config cacache.
12:02:40 PM: added 309 packages, and audited 310 packages in 6s
12:02:40 PM: 126 packages are looking for funding
12:02:40 PM: run npm fund for details
12:02:40 PM: found 0 vulnerabilities
12:02:40 PM: NPM modules installed
12:02:41 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:02:41 PM: npm WARN config location in the cache, and they are managed by
12:02:41 PM: npm WARN config cacache.
12:02:41 PM: Started restoring cached go cache
12:02:41 PM: Finished restoring cached go cache
12:02:41 PM: Installing Go version 1.16.5 (requested 1.16.5)
12:02:45 PM: unset GOOS;
12:02:45 PM: unset GOARCH;
12:02:45 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64';
12:02:45 PM: export PATH="/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64/bin:${PATH}";
12:02:45 PM: go version >&2;
12:02:45 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.16.5.linux.amd64.env"
12:02:45 PM: go version go1.16.5 linux/amd64
12:02:45 PM: Installing missing commands
12:02:45 PM: Verify run directory
12:02:46 PM: ​
12:02:46 PM: ────────────────────────────────────────────────────────────────
12:02:46 PM: Netlify Build
12:02:46 PM: ────────────────────────────────────────────────────────────────
12:02:46 PM: ​
12:02:46 PM: ❯ Version
12:02:46 PM: @netlify/build 27.1.6
12:02:46 PM: ​
12:02:46 PM: ❯ Flags
12:02:46 PM: baseRelDir: true
12:02:46 PM: buildId: 62b55a7b9b455140f881bcfd
12:02:46 PM: deployId: 62b55a7b9b455140f881bcff
12:02:46 PM: ​
12:02:46 PM: ❯ Current directory
12:02:46 PM: /opt/build/repo
12:02:46 PM: ​
12:02:46 PM: ❯ Config file
12:02:46 PM: No config file was defined: using default values.
12:02:46 PM: ​
12:02:46 PM: ❯ Context
12:02:46 PM: production
12:02:46 PM: ​
12:02:46 PM: ────────────────────────────────────────────────────────────────
12:02:46 PM: 1. Build command from Netlify app
12:02:46 PM: ────────────────────────────────────────────────────────────────
12:02:46 PM: ​
12:02:46 PM: $ npm run build
12:02:47 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:02:47 PM: npm WARN config location in the cache, and they are managed by
12:02:47 PM: npm WARN config cacache.
12:02:47 PM: > [email protected] build
12:02:47 PM: > tsc && vite build
12:02:47 PM: sh: 1: tsc: not found
12:02:47 PM: ​
12:02:47 PM: ────────────────────────────────────────────────────────────────
12:02:47 PM: "build.command" failed
12:02:47 PM: ────────────────────────────────────────────────────────────────
12:02:47 PM: ​
12:02:47 PM: Error message
12:02:47 PM: Command failed with exit code 127: npm run build (https://ntl.fyi/exit-code-127)
12:02:47 PM: ​
12:02:47 PM: Error location
12:02:47 PM: In Build command from Netlify app:
12:02:47 PM: npm run build
12:02:47 PM: ​
12:02:47 PM: Resolved config
12:02:47 PM: build:
12:02:47 PM: command: npm run build
12:02:47 PM: commandOrigin: ui
12:02:47 PM: environment:
12:02:48 PM: Creating deploy upload records
12:02:47 PM: - CI
12:02:47 PM: publish: /opt/build/repo/dist
12:02:47 PM: publishOrigin: ui
12:02:49 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
12:02:47 PM: Caching artifacts
12:02:47 PM: Started saving node modules
12:02:47 PM: Finished saving node modules
12:02:47 PM: Started saving build plugins
12:02:47 PM: Finished saving build plugins
12:02:47 PM: Started saving pip cache
12:02:47 PM: Finished saving pip cache
12:02:47 PM: Started saving emacs cask dependencies
12:02:47 PM: Finished saving emacs cask dependencies
12:02:47 PM: Started saving maven dependencies
12:02:47 PM: Finished saving maven dependencies
12:02:47 PM: Started saving boot dependencies
12:02:47 PM: Finished saving boot dependencies
12:02:47 PM: Started saving rust rustup cache
12:02:47 PM: Finished saving rust rustup cache
12:02:47 PM: Started saving go dependencies
12:02:47 PM: Finished saving go dependencies
12:02:48 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:02:48 PM: Failing build: Failed to build site
12:02:49 PM: Finished processing build request in 20.062966026s

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文