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

version 1.5 cannot be imported due to missing dist dir #125

Open
asipple1 opened this issue Sep 12, 2024 · 1 comment
Open

version 1.5 cannot be imported due to missing dist dir #125

asipple1 opened this issue Sep 12, 2024 · 1 comment

Comments

@asipple1
Copy link

When attempting to import ReactPlayerLoader from @brightcove/react-player-loader using the latest version (1.5), I encountered the following error: Internal server error: Failed to resolve import "brightcove/react-player-loader".
However, after downgrading to version 1.4.2, the issue is resolved, and everything works as expected. Upon further investigation, I observed that version 1.5 appears to be missing the dist directory, which is present in version 1.4.2.

Screenshot of version 1.5 in my node_modules

Screenshot 2024-09-12 at 7 17 13 AM

Screenshot of version 1.4.2 in my node_modules

Screenshot 2024-09-12 at 7 17 56 AM

@GerryP2
Copy link

GerryP2 commented Sep 26, 2024

I have created our own declare module to bypass this.

brightcove-react-player-loader.d.ts

declare module '@brightcove/react-player-loader' {
    import * as React from 'react';
  
    export interface ReactPlayerLoaderProps {
      accountId: string;
      playerId: string;
      videoId?: string | number | undefined; 
      onSuccess?: (success: any) => void;
      onFailure?: (success: any) => void;
    }
  
    const ReactPlayerLoader: React.ComponentType<ReactPlayerLoaderProps>;
    export default ReactPlayerLoader;
}

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