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
newExternalsPlugin({type: 'commonjs',// use regex works.include: /@tiddlygit\+tiddlywiki@(.+)|llama-node(.+)|@llama-node(.+)/,// when using npm, we can use this. But with pnpm, this won't work ↓// include: path.join(__dirname, 'node_modules', '.pnpm', '@tiddlygit', 'tiddlywiki'),}),newThreadsPlugin({target: 'electron-node-worker',plugins: ['ExternalsPlugin'],}),
require() of ES Module xx/Resources/node_modules/llama-node/dist/llm/llama-cpp.js from xx/Resources/app.asar.unpacked/.webpack/main/948.index.worker.js not supported.
Instead change the require of llama-cpp.js in xx/Resources/app.asar.unpacked/.webpack/main/948.index.worker.js to a dynamic import() which is available in all CommonJS modules. Error [ERR_REQUIRE_ESM]: require() of ES Module xx/Resources/node_modules/llama-node/dist/llm/llama-cpp.js from xx/Resources/app.asar.unpacked/.webpack/main/948.index.worker.js not supported.
Instead change the require of llama-cpp.js in xx/Resources/app.asar.unpacked/.webpack/main/948.index.worker.js to a dynamic import() which is available in all CommonJS modules.
I always get #461 for a worker, I think is is due to fail to import some deps, so I use dynamic import instead for a try
And I get
importScripts is not defined
related compiled code
The text was updated successfully, but these errors were encountered: