-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add cli package #93
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the code and I get an error if I run the apibara:dev
command in the example repo. I think we should use a more robust way to invoke the compiled module, for example by loading it with createJiti
and invoking it that way. What do you think?
◐ Starting dev server 20:10:50
✔ Types generated 20:10:51
✔ Output directory cleaned 20:10:51
✔ Indexers built in 4269 ms apibara 20:10:55
✔ Dev server started 20:10:55
✔ Starting indexers 20:10:55
node:events:496
throw er; // Unhandled 'error' event
^
Error: spawn jiti ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn jiti',
path: 'jiti',
spawnargs: [
'/home/fra/Hacks/apibara/typescript-sdk/examples/cli/dist/main.mjs'
]
}
Node.js v20.12.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it to work by reinstalling. I still think it's worth exploring how feasible it is to use jiti as a library and not relying on it being in the user path.
5fa842b
to
6413527
Compare
No description provided.