Ark attest cannot find module error
Hello!
In a pnpm monorepo, with
@ark/attest
installed in the workspace root and running pnpx run attest trace .
, I get the following output:
What should I change to run it without issues?103 Replies
Well it looks like you're running from cjs so you'll need to add
"type": "module"
to your package.json
It looks like from the stack trace attest's code is never executedEven with type module in the root package json it's giving the same error
Try adding more context without all the ...
I can't really see what's happening from that
Are there any changes I need to make to the code itself? Maybe I didn't understand the docs?
No haha
You just install the package and run that command you can tell it is not even running attest's code
Wait did you run
pnpm attest trace
?
Or just attest trace
npm installing something doesn't put it on your path
Depending whether you're using npm/pnpm/yarn whatever just run it using thatpnpm attest trace .
and pnpx attest trace .
throw the same errorShow the whole output
"Starting: attest trace ."
Starting: attest trace ....
Error: Cannot find module '/home/p/Documents/Projects/web/attest'This seems kinda sus
That somehow it is not actually being resolved through node_modules
Should I hoist it?
No lol
I mean I don't know what's going on but I don't just have some random fix this is not a normal issue it seems like something with your env
Most attest users use pnpm like this
So it doesn't just not work haha
What isthe output for just
pnpm attest trace .
The help section +
Just paste the whole thing
Including the command and all output
okay maybe I just broke it with the release yesterday then because I just changed how ts aliases are loaded
It worked for me locally but maybe something externally breaks