lifan0127 / ai-research-assistant

Aria is Your AI Research Assistant Powered by GPT Large Language Models
GNU Affero General Public License v3.0
1.06k stars 57 forks source link

Unable to produce working build, largely due to missing `package-lock.json` #106

Closed renyuneyun closed 4 months ago

renyuneyun commented 4 months ago

I'm trying to do a local-build of the extension, to implement custom features (esp, for using custom models). However, I cannot produce a working build (through npm run build).

There are several issues (won't build & built package installable but not working on zotero), but it looks like the eventual issue lies in the missing of package-lock.json. Without it, npm will try to find arbitrary (newer) versions of packages, which do not exactly align with what is expected by the codebase (esp, post-install script).

I actually manually fixed some versions of packages and made something working (but still with issues as summarized above). But currently I'm stuck with the following, which is probably due to package openai's version issue:

[build-prod] [Build] BUILD_DIR=builds, VERSION=0.7.0, BUILD_TIME=2024-07-21 17:27:39, ENV=production
[build-prod] ✘ [ERROR] No matching export in "node-modules-polyfills:fs" for import "ReadStream"
[build-prod] 
[build-prod]     node_modules/langchain/node_modules/openai/_shims/node-runtime.mjs:5:9:
[build-prod]       5 │ import { ReadStream as FsReadStream } from 'node:fs';
[build-prod]         ╵          ~~~~~~~~~~
[build-prod] 
[build-prod] npm run build-prod exited with code 1

So, would you mind including the package-lock.json in the repo (which is expected for a JS project, by the way)?

lifan0127 commented 4 months ago

Sorry for my oversight. The package-lock.json file has been committed. Please let me know if you have any other questions.

renyuneyun commented 4 months ago

Thank you very much. It works now. By the way, is it possible to use the tool for QA based on the PDF document to help reading? If not now, is it within the plan for future development?