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

Not exported from 'newrelic-video-core' error #4

Open
WillSquire opened this issue May 6, 2022 · 0 comments
Open

Not exported from 'newrelic-video-core' error #4

WillSquire opened this issue May 6, 2022 · 0 comments

Comments

@WillSquire
Copy link

Importing newrelic-video-videojs like newrelic-video-core can be imported (and is imported in this repo) throws the following error in the Typescript project:

Attempted import error: 'VideojsTracker' is not exported from 'newrelic-video-core' (imported as 'nrvideo').

Making the following changes solved the problem for me:

diff --git a/node_modules/newrelic-video-videojs/src/index.js b/node_modules/newrelic-video-videojs/src/index.js
index 32b64c7..f15b601 100644
--- a/node_modules/newrelic-video-videojs/src/index.js
+++ b/node_modules/newrelic-video-videojs/src/index.js
@@ -2,5 +2,4 @@ import * as nrvideo from 'newrelic-video-core'
 import Tracker from './tracker'
 import './register-plugin'
 
-nrvideo.VideojsTracker = Tracker
-module.exports = nrvideo
+export default { ...nrvideo, VideojsTracker: Tracker }
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