llm-tools / embedJs

A NodeJS RAG framework to easily work with LLMs and embeddings
https://llm-tools.mintlify.app/get-started/introduction
Apache License 2.0
334 stars 40 forks source link

./dist is empty #4

Closed vgkids closed 10 months ago

vgkids commented 10 months ago

Getting an error trying to import any of the classes. Simplest example:

import { LLMApplicationBuilder } from '@llm-tools/embedjs';

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../embedJsDemo/node_modules/@llm-tools/embedjs/dist/core/llm-application.js' imported from ...embedJsDemo/node_modules/@llm-tools/embedjs/dist/index.js

Likely related, starting with version 0.0.44, @llm-tools/embedjs/dist is missing everything but index.js and the package only contains 4 files. https://www.npmjs.com/package/@llmembed/embedjs/v/0.0.44?activeTab=code

0.0.32 looks closer to expectation, with 75 files: https://www.npmjs.com/package/@llmembed/embedjs/v/0.0.32?activeTab=code

adhityan commented 10 months ago

Thanks @vgkids for bringing this to my attention. I am looking into this.

adhityan commented 10 months ago

I have published a new version 0.0.48 that addresses the issue. I have tested this with the example slack bot.

The issue was two fold -

  1. NPM uses .gitignore if .npmignore is absent. dist folder was added to .gitignore and that caused issues.
  2. Using the format dist/**/* in files was also not working correctly. Switched to the simpler dist string fixes that issue.

Will leave the issue open for now. If it works for you, please go ahead and close the issue.

vgkids commented 10 months ago

Looks good, I'm able to import the builder now and contents of ./dist look plausible.