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

DeFi wallet login buton breaks the Next.js build #1046

Closed
vladimirrostok opened this issue Feb 11, 2024 · 2 comments
Closed

DeFi wallet login buton breaks the Next.js build #1046

vladimirrostok opened this issue Feb 11, 2024 · 2 comments

Comments

@vladimirrostok
Copy link

vladimirrostok commented Feb 11, 2024

I always get this

ReferenceError: navigator is not defined
    at y (**\.next\server\chunks\2335.js:23:102029)
    at nM (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47419)
    at nN (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64674)
    at nI (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:46806)
    at nM (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47570)
    at nN (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64674)
    at nB (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:67657)
    at nF (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:66824)
    at nN (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64990)
    at nB (**\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:67657)

when I uncomment the following component at the /unlock page

              <ExtensionLoginButton
                onLoginRedirect={onLoginRedirect}
                loginButtonText="DeFi Wallet"
                {...commonProps}
              />
@vladimirrostok
Copy link
Author

Other components work as expected, probably this is related to me missing some of wrappers at the code or this should work as expected if all other options work fine?

              <WalletConnectLoginButton
                loginButtonText="xPortal App"
                onLoginRedirect={onLoginRedirect}
                {...commonProps}
              />
              <LedgerLoginButton
                loginButtonText="Ledger"
                onLoginRedirect={onLoginRedirect}
                {...commonProps}
              />
               Comment this out as this breaks the build due to errors inside
              <ExtensionLoginButton
                onLoginRedirect={onLoginRedirect}
                loginButtonText="DeFi Wallet"
                {...commonProps}
              />
              <OperaWalletLoginButton
                loginButtonText="Opera Crypto Wallet - Beta"
                {...commonProps}
              />
              <WebWalletLoginButton
                loginButtonText="Web Wallet"
                data-testid="webWalletLoginBtn"
                {...commonProps}
              />
              ```

@vladimirrostok
Copy link
Author

I have moved this Next.js-related issue to Next.js repository
multiversx/mx-template-dapp-nextjs#52

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

1 participant