[bug]: algoliasearch doesn't compile with Node 20
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- node.js, typescript
- 领域
- build-system
调研方向
使用列出的 mkdir、gts init、npm install 和 npm run compile 步骤复现失败,然后检查第 43 行的 node_modules/@algolia/client-common/dist/common.d.ts 以及生成的项目设置。使用 algoliasearch 5.35.0 和 Node 20 确认该问题;完成的标准是示例项目能够在没有报告的 Storage 错误的情况下编译。
由索引模型根据 Issue 内容生成。
描述
Description
When compiling we get the following error:
node_modules/@algolia/client-common/dist/common.d.ts:43:20 - error TS2304: Cannot find name 'Storage'.
43 localStorage?: Storage | undefined;
~~~~~~~
Steps to reproduce:
- Run
mkdir algolia-test && cd algolia-test - Run
npx gts init - When you read
package.json does not exist. Generate:typey - Run
npm install algoliasearch - Run
npm install @types/node@20 - Add
import {algoliasearch} from 'algoliasearch';to the top of theindex.ts - Run
npm run compile
Client
All
Version
5.35.0
Relevant log output
npm run compile
> compile
> tsc
node_modules/@algolia/client-common/dist/common.d.ts:43:20 - error TS2304: Cannot find name 'Storage'.
43 localStorage?: Storage | undefined;
~~~~~~~
Found 1 error in node_modules/@algolia/client-common/dist/common.d.ts:43
- 主要语言
- TypeScript
- 星标
- 1.4k
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
algolia/algoliasearch-client-javascript 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
algolia/algoliasearch-client-javascript#1583 · 14 条评论 · 9 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 38/100
-
[bug]: Algolia JS Client cause `Bun` to crash on `Hono`可能重新可做 @PrevailUgah 于 238 天前认领,目前没有进行中的 PR。 未关闭bug
难度 4/5 3-5 天 新手友好度 35/100
algolia/algoliasearch-client-javascript#1601 · 5 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
-
bug
难度 4/5 3-5 天 新手友好度 25/100
algolia/algoliasearch-client-javascript#1588 · 3 个 reaction ·
查看 algolia/algoliasearch-client-javascript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
volcengine/OpenViking#8432 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
jupyterlab/eslint-plugin#178 · 2 条评论 ·
-
bug from-app needs-triage
难度 2/5 1-3 小时 新手友好度 65/100
nightly-labs/openbot#16303 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100