Closed kuiyr0810 closed 1 month ago
已解决,algoliasearch版本问题,降级即可
搜索跨大版本升级兼容性问题,修复前保持开启
cc @D-Sketon @FidStyle 测一下 https://github.com/theme-shoka-x/hexo-theme-shokaX/commit/1b4ee209e5befe5b9a3d921724fbc5383003234f 改完的版本搜索能不能正常使用 我这边打包一直在引入algoliaseach@4的js,怀疑打包环境被污染了
没有问题
在开始之前......
assignees
问题发生位置
其他问题
问题描述
X [ERROR] Could not resolve "algoliasearch/dist/algoliasearch-lite.esm.browser.js" (originally "algoliasearch/lite")
The path "./dist/algoliasearch-lite.esm.browser.js" is not exported by package "algoliasearch":
The path "algoliasearch/lite" was remapped to "algoliasearch/dist/algoliasearch-lite.esm.browser.js" using the alias feature, which then couldn't be resolved. Keep in mind that import path aliases are resolved in the current working directory.
You can mark the path "algoliasearch/dist/algoliasearch-lite.esm.browser.js" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html Error: Build failed with 1 error: node_modules/hexo-theme-shokax/source/js/_app/page/search.ts:7:26: ERROR: Could not resolve "algoliasearch/dist/algoliasearch-lite.esm.browser.js" (originally "algoliasearch/lite") at failureErrorWithLog (D:\blog\node_modules\esbuild\lib\main.js:1476:15) at D:\blog\node_modules\esbuild\lib\main.js:945:25 at D:\blog\node_modules\esbuild\lib\main.js:897:52 at buildResponseToResult (D:\blog\node_modules\esbuild\lib\main.js:943:7) at D:\blog\node_modules\esbuild\lib\main.js:970:16 at responseCallbacks. (D:\blog\node_modules\esbuild\lib\main.js:622:9)
at handleIncomingPacket (D:\blog\node_modules\esbuild\lib\main.js:677:12)
at Socket.readFromStdout (D:\blog\node_modules\esbuild\lib\main.js:600:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
复现步骤
更新了package.json中的所有
相关配置
No response
注意事项