Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Cannot get started in Nuxt 3

未关闭
#20 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
32/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
nuxtjs, react, typescript
领域
api, frontend

调研方向

Start by reproducing the Nuxt 3 failure with getClient and inspect @umami/api-client/dist/cjs/index.js and its next-basics require stack. Compare the behavior with the API client requirements documentation; done means a Nuxt 3 page can load with getClient without requiring React or an undocumented dependency.

由索引模型根据 Issue 内容生成。

描述

I was trying to use @umami/api-client in my application built with Nuxt 3 but I cannot even get started with getClient. The page won't load correctly if I called getClient somewhere. Deleting the calls will bring the page back.

What Nuxt gave me after I added the getClient call and reloaded the page:

Cannot find module 'react'
Require stack:
- node_modules/.store/[email protected]/node_modules/next-basics/dist/cjs/index.js
- node_modules/.store/@[email protected]/node_modules/@umami/api-client/dist/cjs/index.js"
at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Function._load (node:internal/modules/cjs/loader:1051:27)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (./node_modules/.store/[email protected]/node_modules/next-basics/dist/cjs/index.js:1:75)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Object..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Function._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)

I can't figured out why it's related to React, and the problem won't go away even if I installed react@latest as dependency (this sounds not right though). The Requirements in the doc only points out that >= 18.18 Node.js environment should be present. I didn't seem to find anything to do with React.

Anybody can help?

主要语言
TypeScript
星标
47
派生
18
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

umami-software/api-client 的其他 Issue

查看 umami-software/api-client 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。