当前位置: 首页 > 知识库问答 >
问题:

前端 - husky在jenkins打包找不到.git文件?

段晨
2023-12-04
  • cd project
  • pnpm install
    Scope: all 8 workspace projects
    Lockfile is up to date, resolution step is skipped
    Already up to date

. postinstall$ turbo run stub
. postinstall: • Packages in scope: @vben/eslint-config, @vben/hooks, @vben/stylelint-config, @vben/ts-config, @vben/types, @vben/vite-config, server
. postinstall: • Running stub in 7 packages
. postinstall: • Remote caching disabled
. postinstall: @vben/vite-config:stub: cache hit, replaying logs aee9b5a8a56482ca
. postinstall: @vben/vite-config:stub:
. postinstall: @vben/vite-config:stub: > @vben/vite-config@1.0.0 stub /var/lib/jenkins/workspace/data_assets_back/data_assets_web/internal/vite-config
. postinstall: @vben/vite-config:stub: > pnpm unbuild --stub
. postinstall: @vben/vite-config:stub:
. postinstall: @vben/vite-config:stub: [info] Stubbing @vben/vite-config
. postinstall: @vben/stylelint-config:stub: cache hit, replaying logs 452987acea040030
. postinstall: @vben/stylelint-config:stub:
. postinstall: @vben/stylelint-config:stub: > @vben/stylelint-config@1.0.0 stub /var/lib/jenkins/workspace/data_assets_back/data_assets_web/internal/stylelint-config
. postinstall: @vben/stylelint-config:stub: > pnpm unbuild --stub
. postinstall: @vben/stylelint-config:stub:
. postinstall: @vben/stylelint-config:stub: [info] Stubbing @vben/stylelint-config
. postinstall: @vben/eslint-config:stub: cache hit, replaying logs 9bd54888982ea3f7
. postinstall: @vben/eslint-config:stub:
. postinstall: @vben/eslint-config:stub: > @vben/eslint-config@1.0.0 stub /var/lib/jenkins/workspace/data_assets_back/data_assets_web/internal/eslint-config
. postinstall: @vben/eslint-config:stub: > pnpm unbuild --stub
. postinstall: @vben/eslint-config:stub:
. postinstall: @vben/eslint-config:stub: [info] Stubbing @vben/eslint-config
. postinstall: Tasks: 3 successful, 3 total
. postinstall: Cached: 3 cached, 3 total
. postinstall: Time: 314ms >>> FULL TURBO
. postinstall: Done
. prepare$ husky install
. prepare: husky - .git can't be found (see https://typicode.github.io/husky/#/?id=custom-directory)
. prepare: Failed
 ELIFECYCLE  Command failed with exit code 1.

共有1个答案

邓禄
2023-12-04

你可以尝试一下更新nodejs 版本 这是在他们的网站Node.js (>=14.19.0 or >=16.9.0),如果没在这个范围可以考虑更新一下

 类似资料:
  • git commit 后提示 'node' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 husky - pre-commit hook exited with code 1 (error) ,有node而且在命令行正确出来node的,网上什么删除最近的提交等等方法都不行 最后就删除了git,重新创建版本库,就正常了 提交了几次后,又突然提示找不到node了 那就再次删除,后面又重演上面

  • 原本注释是要用的,但只要一打包就开始报错: Could not open requirements file: [Errno 2] No such file or directory: './requirements.txt' 报错很明确就是文件找不到,不过,文件是存在的,前面copy进去,为了确保文件存在: 如下强制修改成这样,用ls查看,文件存在 用一个相似结构的项目的dockerfile 结

  • 我正在用spring boot后端和angular前端构建一个应用程序。我正在使用前端maven插件在运行maven时构建前端当我运行mvn spring boot:run时我得到以下错误: 它似乎找不到package.json文件?为什么它在用户目录中寻找它?在客户文件夹里 这是我的pom: 以下是我的项目结构: 知道是怎么回事吗?

  • 我使用SpringBootMaven插件将应用程序打包为jar文件。 它可以在Itellij IDE中找到直接运行的资源文件,但之后找不到资源文件,显示错误为: JAVA木卫一。FileNotFoundException:类路径资源[jmxremote.password]无法解析为绝对文件路径,因为它不位于文件系统:jar:file:/home/XXX/target/yyyy中。罐子/BOOT-I

  • 问题内容: 我正在运行一个简单的服务器 当我向主页发出GET请求时,运行时将引发以下错误 我不明白这个错误。有任何想法吗?我正在Cloud9中工作。 我的目录结构是 问题答案: 包含路径是相对的,您需要更新路径以包含“ partials”子文件夹,例如 查看文档

  • 问题内容: 我的xcodebuild通过ant成功运行了。如果我使用ssh进入系统并运行构建,则可以正常工作。但是,当通过Jenkins调用相同的ant目标(在mac上作为从设备运行)时,经典 为了使其正常工作,我尝试通过“ sudo ant”调用来运行它,当然,这会导致相同的错误。本地用户和root用户都回显相同的$ PATH,所以这不是问题。我看不到改变环境或改变Jenkins调用ant的用户