security/user.ts imports ../json/systemSchema.json without an import attribute:
import systemSchema from '../json/systemSchema.json';
The TypeScript build compiles this to a CommonJS require, so the shipped dist is unaffected. Loading the source through Node's ESM loader fails with ERR_IMPORT_ATTRIBUTE_MISSING: Module ".../json/systemSchema.json" needs an import attribute of "type: json".
Where it shows up
integrationTests/server/ollama-backend.test.ts dynamically imports OllamaBackend from source, which pulls in security/user.ts. The suite only runs when a live Ollama server is reachable, so CI never exercises it; on a machine with Ollama running, all 6 tests are cancelled at module load:
✖ OllamaBackend against a real Ollama instance
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "file:///…/json/systemSchema.json" needs an import attribute of "type: json"
ℹ pass 0 fail 0 cancelled 6
Observed on main at 726dd1e with Node 24.21.
Fix
Add with { type: 'json' } to the import (TypeScript 5.3+ supports import attributes and emits them for ESM output), or read the file with readFileSync + JSON.parse. Check the other source-level JSON imports reached from components/ollama/ for the same pattern.
security/user.tsimports../json/systemSchema.jsonwithout an import attribute:The TypeScript build compiles this to a CommonJS
require, so the shippeddistis unaffected. Loading the source through Node's ESM loader fails withERR_IMPORT_ATTRIBUTE_MISSING: Module ".../json/systemSchema.json" needs an import attribute of "type: json".Where it shows up
integrationTests/server/ollama-backend.test.tsdynamically importsOllamaBackendfrom source, which pulls insecurity/user.ts. The suite only runs when a live Ollama server is reachable, so CI never exercises it; on a machine with Ollama running, all 6 tests are cancelled at module load:Observed on
mainat 726dd1e with Node 24.21.Fix
Add
with { type: 'json' }to the import (TypeScript 5.3+ supports import attributes and emits them for ESM output), or read the file withreadFileSync+JSON.parse. Check the other source-level JSON imports reached fromcomponents/ollama/for the same pattern.