GPT-5 finding
Non-standard import.meta.dirname used to resolve proto path will crash under Node ESM
highbughigh
- src/grpc/server.ts:12
Node’s ESM does not define import.meta.dirname. Accessing it at module load will throw, preventing the gRPC server from starting and any consumer from importing this module.
Recommendation
Resolve the proto path using fileURLToPath(new URL('.', import.meta.url)) or equivalent ESM-safe pattern. Example: const __dirname = path.dirname(fileURLToPath(import.meta.url)); const PROTO_PATH = path.resolve(__dirname, '../proto/openclaude.proto').