#BuildTools
共 19 篇文章
解决 Tailwind CSS 报错 Unknown at rule @apply PostCSS配置修复
排查 CSS 文件中使用 @apply / @tailwind 提示 Unknown at rule @apply 警告或构建失败,配置 postcss.config.js 与 VS Code 设置。
解决 Rollup 报错 Circular dependency detected packaging loop 循环依赖修复
排查 Rollup / Vite 在打包模块时控制台疯狂刷屏 Circular dependency: src/a.js -> src/b.js -> src/a.js,生产运行引发运行时 undefined 变量,分析 循环引用与 TDZ(暂时性死区)。
解决 Turborepo 报错 Package cycle detected pipeline deadlock 循环依赖死锁修复
排查 Turborepo 执行全局构建时报错 Package cycle detected: A -> B -> A 导致任务调度器死锁退出,分析 Monorepo 跨包引用闭环与拓扑排序阻断。
解决 Vite 报错 import.meta.glob failed to resolve dynamic import 动态匹配修复
排查 Vite 在生产构建时报 Error: Cannot find module 或 import.meta.glob failed to resolve,开发环境正常但 build 后静态路由白屏,分析 动态导入通配符规则与 Rollup 打包分析。
解决 Vite 报错 Restricted file access server.fs.deny 越界访问拒绝修复
排查 在 Monorepo 或引入工作区外部公共文件时,Vite 开发服务器报 403 Forbidden 或 The request url is outside of Vite serving allow list,分析 server.fs.allow 安全沙箱策略。
解决 Vite 报错 Failed to resolve import 路径别名修复
排查 Vite 开发服务器启动或热更新提示 [vite] Internal server error: Failed to resolve import '@/utils/api',配置 resolve.alias 与 tsconfig 映射。
解决 Nx 报错 Project graph construction failed cache corrupted 依赖图损坏修复
排查 在 Nx Monorepo 中运行 nx affected 或 build 时报错 Project graph construction failed: daemon crashed or cache corrupted,分析 守护进程(Nx Daemon)与项目依赖图缓存。
解决 Android Gradle 报错 SDK location not found 环境变量修复
排查 Android Gradle 构建失败提示 SDK location not found. Define location with an ANDROID_HOME environment variable,配置 local.properties 与系统变量。
解决 Vite 报错 Outdated optimized dep reload new dependencies 频繁重载修复
排查 Vite 本地开发时浏览器控制台频繁打印 [vite] page reload because new dependencies were found,导致页面无限刷新、状态丢失,分析 依赖预构建(Dependency Pre-bundling)与静态扫描。
解决 Rollup 报错 is not exported by CommonJS module 命名导出失败修复
排查 使用 Rollup 打包导入旧版 CommonJS 模块(如 react-is)时报 'default' is not exported by node_modules/react-is/index.js,分析 @rollup/plugin-commonjs 导出推断与 syntheticNamedExports。
解决 Vite 报错 Assets relative path 404 base 配置失效修复
排查 Vite 打包部署到服务器非根子路径(如 /app/)后,所有图片、字体与 CSS 资源报 404 Not Found,分析 base 配置选项与生产静态资源定位。
解决 Rollup 报错 terser minification JavaScript heap out of memory 压缩内存溢出修复
排查 Rollup / Vite 在对海量单体文件执行生产代码压缩(Terser)时,进程突发崩溃报 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory,分析 Terser 多线程占用与 esbuild-minify 替换方案。
解决 esbuild 报错 Top-level await is not available with format iife 修复
排查 esbuild 编译包含顶层 await 代码时报错 Top-level await is currently not supported with the "iife" or "cjs" output format,分析 ESM 与 CJS/IIFE 输出格式对顶层异步的支持差异。
解决 Android Gradle 报错 Direct local aar dependencies not supported 依赖修复
排查 Android Gradle Plugin 8.0+ 报 Direct local .aar file dependencies are not supported 错误,介绍独立模块封装与 flatDir 替代方案。
解决 esbuild 报错 Transforming let or const to ES5 is not supported 目标降级修复
排查 使用 esbuild 快速编译现代前端工程时,配置 target: 'es5' 抛出 Error: Transforming const to the configured target environment (es5) is not supported,分析 esbuild 设计哲学与 Babel 协作分工。
解决 Lerna 报错 command not found hoisted binaries 提升命令丢失修复
排查 在子包中运行 npm scripts(如 jest / tsc)时报错 sh: jest: command not found,分析 Lerna 依赖提升(--hoist)与子包 node_modules/.bin 环境变量路径寻址。
解决 Turborepo 报错 Remote cache signature verification failed 缓存签名失效修复
排查 在 CI/CD 中开启 Vercel / 自建 Turborepo 远端缓存时报 remote cache signature verification failed 导致全量重新编译,分析 TURBO_SIGNATURE_KEY 与 Hash 签名校验。
解决 Turborepo 报错 Pipeline inputs missing hash mismatch 缓存穿透修复
排查 Turborepo 在源码发生变更后依然命中旧缓存,或者明明未修改文件却无法命中缓存(Cache Miss),分析 inputs 与 outputs 过滤规则及环境变量哈希注入。
解决 iOS Xcode 报错 Command PhaseScriptExecution failed 脚本执行修复
排查 Xcode 15 构建阶段提示 Command PhaseScriptExecution failed with a nonzero exit code,关闭沙盒限制与修复 rsync 权限。


