Skip to content

Commit ac46203

Browse files
committed
fix(cli): export package.json for pgai wrapper resolution
The pgai wrapper uses `require.resolve("postgresai/package.json")` to locate the main CLI package. When the `exports` field was added during the Bun migration, it restricted imports to only explicitly exported paths - but `./package.json` wasn't included. This caused `npx pgai@dev` to fail with "failed to locate postgresai package" because Node.js enforces exports restrictions. Add `./package.json` to the exports map to restore wrapper functionality.
1 parent b9e4aeb commit ac46203

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cli/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"exports": {
2020
".": "./dist/bin/postgres-ai.js",
21-
"./cli": "./dist/bin/postgres-ai.js"
21+
"./cli": "./dist/bin/postgres-ai.js",
22+
"./package.json": "./package.json"
2223
},
2324
"type": "module",
2425
"engines": {

0 commit comments

Comments
 (0)