shannon icon indicating copy to clipboard operation
shannon copied to clipboard

[BUG]: all steps not working

Open hatsunemikugit opened this issue 7 months ago • 4 comments

Describe the bug

I tried updated npm and npx server has an ERR its understandable but about about this one below

` 1. Clone Shannon
git clone https://github.com/KeygraphHQ/shannon.git cd shannon

2. Configure credentials (choose one method)

Option A: Create a .env file

cat > .env << 'EOF' ANTHROPIC_API_KEY=my key is here CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 EOF

Option B: Export environment variables

export ANTHROPIC_API_KEY="my key is here" # or CLAUDE_CODE_OAUTH_TOKEN export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 # recommended

3. Install dependencies and build

pnpm install pnpm build

4. Run a pentest

./shannon start -u https://your-app.com -r (my path to the shannon repo)

fatal: destination path 'shannon' already exists and is not an empty directory. cd: not a directory: shannon Command 'pnpm' not found, did you mean: command 'npm' from deb npm Try: sudo apt install Command 'pnpm' not found, did you mean: command 'npm' from deb npm Try: sudo apt install node:internal/modules/esm/resolve:283 throw new ERR_MODULE_NOT_FOUND( ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/miku/shannon/apps/cli/dist/index.mjs' imported from /home/miku/shannon/shannon at finalizeResolution (node:internal/modules/esm/resolve:283:11) at moduleResolve (node:internal/modules/esm/resolve:952:10) at defaultResolve (node:internal/modules/esm/resolve:1188:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:708:12) at #cachedDefaultResolve (node:internal/modules/esm/loader:657:25) at ModuleLoader.resolve (node:internal/modules/esm/loader:640:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:264:38) at ModuleLoader.import (node:internal/modules/esm/loader:605:34) at defaultImportModuleDynamicallyForModule (node:internal/modules/esm/utils:221:31) at importModuleDynamicallyCallback (node:internal/modules/esm/utils:260:12) { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///home/miku/shannon/apps/cli/dist/index.mjs' }

Node.js v20.19.5 `

Steps to reproduce

Expected behaviour

Failure

Actual behaviour

Error in Node.js

Pre-submission checklist (required)

  • [x] I have searched the existing open issues and confirmed this bug has not already been reported.
  • [x] I am running the latest released version of shannon.

If applicable

  • [ ] I have included relevant error messages, stack traces, or failure details.
  • [ ] I have checked the workspaces folder for logs and pasted the relevant errors.
  • [ ] I have inspected the failed Temporal workflow run and included the failure reason.
  • [ ] I have included clear steps to reproduce the issue.
  • [ ] I have redacted any sensitive information (tokens, URLs, repo names).

Debugging details

No response

Screenshots

No response

CLI mode

npx (@keygraph/shannon)

Provider

Anthropic (API key)

Full command with all flags used (with redactions)

OS (with version)

6.18.9+kali-amd64

Node.js version ('node -v')

v20.19.5

Docker version ('docker -v')

Additional context

No response

hatsunemikugit avatar Apr 26 '26 16:04 hatsunemikugit

Thanks for the report. The errors are all downstream of pnpm not being installed: pnpm install and pnpm build never ran, so apps/cli/dist/index.mjs was never created, which is why ./shannon throws ERR_MODULE_NOT_FOUND. pnpm is listed as a prerequisite for Clone and Build in the README; install it via pnpm.io/installation. The git clone failure is also from a leftover shannon directory from a previous attempt; remove it first:

cd ~
rm -rf shannon

Since you selected npx mode in the form, the simpler path skips the clone entirely:

npx @keygraph/shannon setup
npx @keygraph/shannon start -u https://your-app.com -r /path/to/your-repo

You also mentioned an error on the npx path itself ("npx server has an ERR"). Could you paste that output?

ezl-keygraph avatar Apr 27 '26 12:04 ezl-keygraph

thanks for your support,

i followed the new steps but now after solving them i am facing this issue

px @keygraph/shannon start -u https://your-app.com -r /home/pc/shannon node:fs:1370 const result = binding.mkdir( ^

Error: EACCES: permission denied, mkdir '/home/pc/shannon/.shannon/deliverables' at Object.mkdirSync (node:fs:1370:26) at start (file:///home/pc/.npm/_npx/d42053daf60872b6/node_modules/@keygraph/shannon/dist/index.mjs:1176:8) at async file:///home/pc/.npm/_npx/d42053daf60872b6/node_modules/@keygraph/shannon/dist/index.mjs:1513:3 { errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/home/pc/shannon/.shannon/deliverables' }

Node.js v22.22.2

hatsunemikugit avatar May 06 '26 08:05 hatsunemikugit

Thanks for the update. This one is a permissions issue: mkdir /home/pc/shannon/.shannon/deliverables failing with EACCES means the /home/pc/shannon directory isn't writable by the user account you're running npx as. It was most likely created by a different user, for example via sudo or under another account.

Could you clone the repo again into a fresh location, run everything from the same user account this time, and let us know if it still fails?

ezl-keygraph avatar May 20 '26 19:05 ezl-keygraph

Closing this as stale since there's been no activity for over two weeks. The errors here all trace back to local environment setup rather than a Shannon bug. Feel free to reopen if you're still hitting the issue after cloning into a fresh, writable directory and running as the same user. Thanks!

ezl-keygraph avatar Jun 02 '26 05:06 ezl-keygraph