NextJS integration problem
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- next.js, react
- 领域
- frontend
调研方向
从 Next JS 应用导入 lib/bootstrap-switch-button-react.js 时报告了失败。首先复现服务端导入,并检查包入口点和报告的打包文件是否访问了浏览器全局变量;当库能够被 Next JS 导入且不出现 window 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hello,
I'm trying to use this library in Next JS but I get the below error "Windows is not defined".
ReferenceError: window is not defined
at r (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:9931)
at s (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:10019)
at t.exports (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:13054)
at Object.<anonymous> (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:4427)
at n (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:186)
at Module.<anonymous> (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:1134)
at n (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:186)
at C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:985
at Object.<anonymous> (C:\Users\papad\Desktop\harispap-xyz\node_modules\bootstrap-switch-button-react\lib\bootstrap-switch-button-react.js:1:994)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
- 主要语言
- CSS
- 星标
- 19
- 派生
- 19
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
gitbrent/bootstrap-switch-button-react 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
gitbrent/bootstrap-switch-button-react#23 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 25/100
gitbrent/bootstrap-switch-button-react#68 · 2 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 20/100
-
难度 4/5 3-5 天 新手友好度 25/100
查看 gitbrent/bootstrap-switch-button-react 的全部 Issue
相似的 Issue
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·
-
📕documentation
难度 2/5 1-3 小时 新手友好度 75/100
db-ux-design-system/core-web#8239 ·
-
Area/AI Type/Improvement
难度 1/5 1 小时以内 新手友好度 95/100
wso2/product-integrator#2567 ·
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100