30 Replies
I have no idea what is wrong
😭
I tried AI help and it's going crazy on me
Can you replicate in a test
Whats the issue exactly?
the issue when you use it in another repo like corpus it say

even If it's installed
the dynamic import not working
chat gpt saying I need to use
const resolvedPath = import.meta.resolve("looks-same")
to fix it but idkDoes bun setup help you quickly test?
That should install a custom cli globally
If I had to guess I think the problem has to do with multiple tsci versions running a global installation might not know about your local installations version of looks-same
You can use “which tsci” to determime which is being run
bunx tsci will execute a local version (ie the one corpus has installed)
abse@DESKTOP-DJTK2QV:~/cli$ which tsci
/home/abse/.bun/bin/tsci
Yea thats the global install right
yeah

bunx
So would require a global version of looks-same
Yea this one should work
Try bunx —bun tsci snapshot too
I can take a look in ~15 but a bit of a busy morning

We can also try to make looks-same a dependency
a dev dep ?
in cli ?
Regular dep i think
in cli we have a ci to preven that
Idk why we didn’t cant remember
I think there is a way to say “ignore this dep”
ok
You will need to specify for bun build that looks-same is external https://bun.sh/docs/bundler#external
Bun
Bun.build – Bundler | Bun Docs
Bundle code for consumption in the browser with Bun's native bundler.
We bundle the entire cli but we cant bundle looks-same or more specifically sharp
Idk your approach should also work tbh
@Seve
"build:bun": "bun build ./cli/main.ts --target node --outfile ./dist/main.js --external looks-same"
can we do this.If it works then yes!!!
how can I test it ?
You should verify that the dist directory size is different
ok
the smoke test is not failing now + all tests passed (the dist sile size didn't chagne tho)
@Seve
there is also this
cli/entrypoint.js
file idk what changed in it , I didn't touch it
@Seve IT WORKSSSSS
🎉awesome!!!!