You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after package the node-llama-cpp with electron it gives the error
Expected Behavior
expected behavior is that it should run but it does not run
Actual Behavior
actual dehavior is that it gives the following error when build for linux appimage
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier "#ansi-styles" is not defined imported from /tmp/.mount_ai-locIrAA9V/resources/app.asar/node_modules/node-llama-cpp/node_modules/chalk/source/index.js
at importNotDefined (node:internal/modules/esm/resolve:305:10)
at packageImportsResolve (node:internal/modules/esm/resolve:755:9)
at moduleResolve (node:internal/modules/esm/resolve:854:16)
at defaultResolve (node:internal/modules/esm/resolve:994:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:685:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:634:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:617:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:273:38)
at ModuleJob._link (node:internal/modules/esm/module_job:135:49)
@vvaibhavv11 I'm not sure what's wrong in your project configurations, but it's definitely related to Electron and not specific to node-llama-cpp.
I recommend you to scaffold a new node-llama-cpp Electron project and base your project on top of it using this command:
well i found that the problem might be with electron or electron-builder most likely be with electron-builder because it gives error in production and the main error is when any dependency use the packages import like this
Issue description
after package the node-llama-cpp with electron it gives the error
Expected Behavior
expected behavior is that it should run but it does not run
Actual Behavior
actual dehavior is that it gives the following error when build for linux appimage
Steps to reproduce
just clone the project and run
pnpm dist:linux
My Environment
Additional Context
No response
Relevant Features Used
Are you willing to resolve this issue by submitting a Pull Request?
No, I don’t have the time, but I can support (using donations) development.
The text was updated successfully, but these errors were encountered: