Bug Report
Version: 0.8.0-rc.72
Platform: Windows (Node.js v22.22.2)
Error
file:///C:/Users/user/AppData/Local/nvm/v22.22.2/node_modules/crewx/dist-server/src/server/domain/knowledge/knowledge.service.js:10
import { parseFrontmatter as kcParseFrontmatter, searchEntries as kcSearchEntries, buildGraph as kcBuildGraph, loadSearchConfig, } from '@user/knowledge-core';
^^^^^^^^^^^^^^^^
SyntaxError: Named export 'loadSearchConfig' not found. The requested module '@user/knowledge-core' is a CommonJS module, which may not support all module.exports as named exports.
Root Cause
knowledge.service.ts uses ESM named imports from @user/knowledge-core which is a CommonJS module. Node.js cannot automatically resolve CJS module.exports as ESM named exports.
Fix Required
Change the import in knowledge.service.ts (and any other files with the same pattern):
Before (broken):
import { parseFrontmatter as kcParseFrontmatter, searchEntries as kcSearchEntries, buildGraph as kcBuildGraph, loadSearchConfig } from '@user/knowledge-core';
After (fixed):
import pkg from '@user/knowledge-core';
const { parseFrontmatter: kcParseFrontmatter, searchEntries: kcSearchEntries, buildGraph: kcBuildGraph, loadSearchConfig } = pkg as any;
Or alternatively, ensure @user/knowledge-core exports are ESM-compatible by adding a proper exports map.
Impact
crewx command crashes on startup. Server exits with code 1. Breaks all functionality.
Steps to Reproduce
- Install crewx 0.8.0-rc.72 globally
- Run
crewx
- Server exits immediately with the above SyntaxError
Bug Report
Version: 0.8.0-rc.72
Platform: Windows (Node.js v22.22.2)
Error
Root Cause
knowledge.service.tsuses ESM named imports from@user/knowledge-corewhich is a CommonJS module. Node.js cannot automatically resolve CJSmodule.exportsas ESM named exports.Fix Required
Change the import in
knowledge.service.ts(and any other files with the same pattern):Before (broken):
After (fixed):
Or alternatively, ensure
@user/knowledge-coreexports are ESM-compatible by adding a proper exports map.Impact
crewxcommand crashes on startup. Server exits with code 1. Breaks all functionality.Steps to Reproduce
crewx