Skip to content

Commit da9611f

Browse files
lalaluneclaude
andcommitted
fix(test): add subpath aliases for @elizaos/plugin-local-inference
Plugin Tests CI failure on app-hyperliquid perpetual-market.test.ts: Error: ENOTDIR: not a directory, open '/home/runner/work/eliza/eliza/plugins/plugin-local-inference/src/index.ts/runtime' When the prior fix changed tsconfig.dist-paths.json to map '@elizaos/plugin-local-inference' at the package's src/index.ts (because the tsup build doesn't emit .d.ts files), the base alias covered the bare specifier but vite's resolver was naively appending the '/runtime' subpath to the mapped file. Vitest pipelines that load packages/app-core/src/index.ts (which exports from '@elizaos/plugin-local-inference/runtime') started erroring. Added explicit subpath maps for /runtime, /routes, /services in both tsconfig.dist-paths.json and packages/app-core/vitest.config.ts. Each points at the corresponding src/<subpath>/index.ts (same shape the package.json 'exports' object declares, just resolved to source because tsup-emitted .d.ts files don't exist). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 432347b commit da9611f

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

packages/app-core/vitest.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,18 @@ export default defineConfig({
286286
find: /^@elizaos\/plugin-local-inference$/,
287287
replacement: path.join(pluginLocalInferenceSrc, "index.ts"),
288288
},
289+
{
290+
find: /^@elizaos\/plugin-local-inference\/runtime$/,
291+
replacement: path.join(pluginLocalInferenceSrc, "runtime", "index.ts"),
292+
},
293+
{
294+
find: /^@elizaos\/plugin-local-inference\/routes$/,
295+
replacement: path.join(pluginLocalInferenceSrc, "routes", "index.ts"),
296+
},
297+
{
298+
find: /^@elizaos\/plugin-local-inference\/services$/,
299+
replacement: path.join(pluginLocalInferenceSrc, "services", "index.ts"),
300+
},
289301
{
290302
find: /^@elizaos\/plugin-local-embedding$/,
291303
replacement: path.join(pluginLocalEmbeddingSrc, "index.ts"),

tsconfig.dist-paths.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,15 @@
305305
"@elizaos/plugin-local-inference": [
306306
"./plugins/plugin-local-inference/src/index.ts"
307307
],
308+
"@elizaos/plugin-local-inference/runtime": [
309+
"./plugins/plugin-local-inference/src/runtime/index.ts"
310+
],
311+
"@elizaos/plugin-local-inference/routes": [
312+
"./plugins/plugin-local-inference/src/routes/index.ts"
313+
],
314+
"@elizaos/plugin-local-inference/services": [
315+
"./plugins/plugin-local-inference/src/services/index.ts"
316+
],
308317
"@elizaos/app-task-coordinator": [
309318
"./plugins/app-task-coordinator/dist/index.d.ts"
310319
],

0 commit comments

Comments
 (0)