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

SyntaxError: Cannot use import statement outside a module #13

Open
MrRoyce opened this issue Oct 25, 2024 · 0 comments
Open

SyntaxError: Cannot use import statement outside a module #13

MrRoyce opened this issue Oct 25, 2024 · 0 comments

Comments

@MrRoyce
Copy link

MrRoyce commented Oct 25, 2024

Using v0.12.23, when trying to build and deploy to my server I get the error message SyntaxError: Cannot use import statement outside a module when using the syntax:

import pkg from '@100mslive/hms-video-store';
const { selectIsConnectedToRoom, selectPeers, selectIsLocalAudioEnabled, selectIsLocalVideoEnabled } = pkg;

If I use the syntax in the example:

import {
  selectIsConnectedToRoom,
  selectIsLocalAudioEnabled,
  selectIsLocalVideoEnabled,
  selectPeers
} from '@100mslive/hms-video-store';

I get the error:

SyntaxError: Named export 'selectIsConnectedToRoom' not found. The requested module '@100mslive/hms-video-store' is a CommonJS module, which may not support all module.exports as named exports.
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