What happened?
I am trying to make an extension to learn how pi works, and I keep running into this issue:
Failed to load extension: Cannot find module '/Users/spiderclam/.local/share/mise/installs/node/26.5.0/lib/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/index.mjs/schema'
I feel like pi is doing something with the path maybe? I tried adding a package.json in the extension dir as well, same result.
My goal with this is defining a config schema, that's all. The reason I suspect something in pi, is because the docs mention typebox as an import path. So maybe something is being replaced to make this work?
ETA: https://github.com/earendil-works/pi/blob/main/packages/coding-agent/src/core/extensions/loader.ts#L47 yeah, this is a bit funky. Maybe this should be changed? I understand the flexibility it offers, and I assume you have a way for me to disable that behavior, but it's unexpected.
Steps to reproduce
New project dir, and then make:
.pi/extensions/pi-my-first-extension/index.ts
with a package.json and typebox installed.
In which I do:
import Schema from "typebox/schema";
Running pi now gives me:
Cannot find module '/Users/spiderclam/.local/share/mise/installs/node/26.5.0/lib/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/index.mjs/schema'
Expected behavior
No error
Version
0.80.6
What happened?
I am trying to make an extension to learn how pi works, and I keep running into this issue:
I feel like pi is doing something with the path maybe? I tried adding a package.json in the extension dir as well, same result.
My goal with this is defining a config schema, that's all. The reason I suspect something in pi, is because the docs mention typebox as an import path. So maybe something is being replaced to make this work?
ETA: https://github.com/earendil-works/pi/blob/main/packages/coding-agent/src/core/extensions/loader.ts#L47 yeah, this is a bit funky. Maybe this should be changed? I understand the flexibility it offers, and I assume you have a way for me to disable that behavior, but it's unexpected.
Steps to reproduce
New project dir, and then make:
.pi/extensions/pi-my-first-extension/index.ts
with a package.json and typebox installed.
In which I do:
Running pi now gives me:
Expected behavior
No error
Version
0.80.6