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

ConnectInstaller.showInstall() -> ReferenceError: window is not defined #62

Open
Parkwochang opened this issue Mar 5, 2024 · 0 comments

Comments

@Parkwochang
Copy link

Description:
I wanted to find out whether the program was installed or not. So I used ConnectInstaller.showInstall() function.
However the build fails because an error occurs: ReferenceError: window is not defined.

Environment:
@ibm-aspera/connect-sdk-js: 5.0.0
Node version: 18.17.0
Browser version: Chrome 121.0.6167.184
Operating System: macOS Sonoma 14.3.1

Example:

'use client';
import { Connect, ConnectInstaller } from "@ibm-aspera/connect-sdk-js";

useLayoutEffect(() => {
    const asperaInstaller = new ConnectInstaller();
    if (typeof window !== 'undefined') {
      Utils.launchConnect((e) => {
        !e && asperaInstaller.showInstall()
        // !e && asperaInstaller.showDownload()
      })
    }
  }, [])

maybe @[email protected]/node_modules/@ibm-aspera/connect-sdk-js/dist/esm/index.js 15:0
-> window.AW4 = __assign(__assign({}, AW4), windowIntegrations);
I think an error occurs here

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