Skip to content
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

Not able to run folder2knowledge #25

Open
amit-immanent opened this issue Feb 13, 2025 · 2 comments
Open

Not able to run folder2knowledge #25

amit-immanent opened this issue Feb 13, 2025 · 2 comments

Comments

@amit-immanent
Copy link

amit-yadav@amityadav:~/Documents/Projects/ai agent/chr/characterfile$ npx folder2knowledge knowFolder
node:internal/modules/cjs/loader:1249
const err = new Error(message);
^

Error: Cannot find module 'pdfjs-dist/legacy/build/pdf'
Require stack:

  • /home/amit-yadav/Documents/Projects/ai agent/chr/characterfile/node_modules/@opendocsg/pdf2md/lib/util/pdf.js
  • /home/amit-yadav/Documents/Projects/ai agent/chr/characterfile/node_modules/@opendocsg/pdf2md/lib/pdf2md.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:138:16)
    at Object. (/home/amit-yadav/Documents/Projects/ai agent/chr/characterfile/node_modules/@opendocsg/pdf2md/lib/util/pdf.js:2:15)
    at Module._compile (node:internal/modules/cjs/loader:1565:14)
    at Object..js (node:internal/modules/cjs/loader:1708:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/amit-yadav/Documents/Projects/ai agent/chr/characterfile/node_modules/@opendocsg/pdf2md/lib/util/pdf.js',
    '/home/amit-yadav/Documents/Projects/ai agent/chr/characterfile/node_modules/@opendocsg/pdf2md/lib/pdf2md.js'
    ]
    }

Node.js v22.12.0

@anthonykimani
Copy link

anthonykimani commented Feb 17, 2025

You need to:

  1. npm install [email protected]
  2. then run: node characterfile/scripts/folder2knowledge.js </path/to/your/documents>

@tomtomdu73
Copy link

@anthonykimani Thanks this works

You need to:

  1. npm install [email protected]
  2. then run: node characterfile/scripts/folder2knowledge.js </path/to/your/documents>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants