CELL_CONFIG_CONFLICT
错误信息
- A Node.js executable needs a CommonJS server bundle.
- The … preset deploys the frontend as static assets of the platform; … does not apply.
- The … preset runs on Cloudflare Workers, which load ES modules only, but the format is ….
- A Node.js executable (compile: node) needs a CommonJS bundle, but the format is esm.
修复方法
- Build with --compile node and without --format esm.
- Remove --single / --compile and build.single / build.compile from cell.config.ts, or use the node preset.
- Remove --format cjs and build.format from cell.config.ts.
- Remove the format setting (node executables use cjs), or compile with 'bun'.
抛出位置
- dev-packages/cli/src/build/executable-compiler.ts:114 (
@celljs/cli) - dev-packages/cli/src/config/config-resolver.ts:110 (
@celljs/cli) - dev-packages/cli/src/config/config-resolver.ts:118 (
@celljs/cli) - dev-packages/cli/src/config/config-resolver.ts:231 (
@celljs/cli)
根据 Cell 4.1.0 的源码生成;错误信息与修复提示是命令行输出的原文(英文)。