Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS integration problem #22

Open
HarisPap11 opened this issue Apr 7, 2020 · 1 comment
Open

NextJS integration problem #22

HarisPap11 opened this issue Apr 7, 2020 · 1 comment

Comments

@HarisPap11
Copy link

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)
@AbdulmelikKalkan
Copy link

I got the same error, is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants