Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

NextJS integration problem

Đang mở
#22 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
next.js, react
Lĩnh vực
frontend

Hướng nghiên cứu

Lỗi được báo cáo khi import lib/bootstrap-switch-button-react.js từ một ứng dụng Next JS. Trước tiên, hãy tái hiện việc import phía máy chủ và kiểm tra entry point của package cũng như file đã bundle được báo cáo để tìm việc truy cập các biến toàn cục của trình duyệt; hoàn tất khi thư viện có thể được import bởi Next JS mà không gặp lỗi window.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)
Ngôn ngữ chính
CSS
Star
19
Fork
19
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của gitbrent/bootstrap-switch-button-react

Tất cả issue của gitbrent/bootstrap-switch-button-react

Issue tương tự

Thêm issue về Web Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.