Closed linonetwo closed 1 year ago
原因是 sqlite-vss 里用到 fileURLToPath(new URL(".", import.meta.url))
, 会被转换成对 webpack/runtime/importScripts
的调用,而 webpack/runtime/importScripts
有bug,用到的 self 是 undefined。
在 https://github.com/tiddly-gittly/TidGi-Desktop/commit/426728fc610388f3f257ed53ccfad1a12f339f24 后,正常的报错信息变为
Unhandled Error
ReferenceError: self is not defined
at /Users/linonetwo/Desktop/repo/TiddlyGit-Desktop/.webpack/main/wikiWorker.index.worker.js:37794:36
at /Users/linonetwo/Desktop/repo/TiddlyGit-Desktop/.webpack/main/wikiWorker.index.worker.js:37808:13
at Object.<anonymous> (/Users/linonetwo/Desktop/repo/TiddlyGit-Desktop/.webpack/main/wikiWorker.index.worker.js:38114:12)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1296:10)
at Module.load (node:internal/modules/cjs/loader:1096:32)
at Module._load (node:internal/modules/cjs/loader:937:12)
at f._load (node:electron/js2c/asar_bundle:2:13330)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at MessagePort.<anonymous> (node:internal/main/worker_thread:161:24)
Environment
TidGi 0.8.0-prerelease9 Electron 24.3.1 darwin 22.4.0 Locale: zh-CN
Description:
Steps to Reproduce:
After enable sqlite-vss
Additional Context