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

TS-NG2: Cannot find module './video-source/video-source'. #27

Closed
jahidshohel opened this issue Aug 13, 2016 · 9 comments
Closed

TS-NG2: Cannot find module './video-source/video-source'. #27

jahidshohel opened this issue Aug 13, 2016 · 9 comments

Comments

@jahidshohel
Copy link

I was following the demo app, and I am getting this error when trying to get hold of the player -

myPause(e:any) {
let videoPlayer = topmost().getViewById('nativeVideoPlayer');
this.doPause(videoPlayer)
}
doPause(videoPlayer:Video) {
videoPlayer.pause();
}

And the error I am getting is -

Found peer TypeScript 1.8.10
app/components/tabs/tab3/tab3.component.ts(27,22): error TS2345: Argument of type 'View' is not assignable to parameter of type 'Video'.
Property 'src' is missing in type 'View'.

node_modules/nativescript-videoplayer/index.d.ts(1,15): error TS2306: File '/Users/jahid/Development/temp/native_script/ns-learning/node_modules/nativescript-videoplayer/videoplayer.d.ts' is not a module.

node_modules/nativescript-videoplayer/videoplayer.d.ts(9,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.

node_modules/nativescript-videoplayer/videoplayer.d.ts(9,34): error TS2307: Cannot find module './video-source/video-source'.

@jahidshohel
Copy link
Author

I have tried changing onEmitError to false, it builds, but at run time fails with error -

08-13 08:55:50.450 27132 27132 W System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
08-13 08:55:50.450 27132 27132 W System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:862)
08-13 08:55:50.450 27132 27132 W System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:727)
08-13 08:55:50.450 27132 27132 W System.err: at com.tns.Runtime.callJSMethod(Runtime.java:713)
08-13 08:55:50.450 27132 27132 W System.err: at com.tns.Runtime.callJSMethod(Runtime.java:694)
08-13 08:55:50.450 27132 27132 W System.err: at com.tns.Runtime.callJSMethod(Runtime.java:684)

@bradmartin
Copy link
Collaborator

Your first error is a TS issue you have, the other TS issues I'll update
the definitions later on to fix those. And your current error looks like
bad code is getting called.

On Sat, Aug 13, 2016, 1:57 AM Jahid Shohel notifications@github.com wrote:

I have tried changing onEmitError to false, it builds, but at run time
fails with error -

08-13 08:55:50.450 27132 27132 W System.err: at
com.tns.Runtime.callJSMethodNative(Native Method)
08-13 08:55:50.450 27132 27132 W System.err: at
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:862)
08-13 08:55:50.450 27132 27132 W System.err: at
com.tns.Runtime.callJSMethodImpl(Runtime.java:727)
08-13 08:55:50.450 27132 27132 W System.err: at
com.tns.Runtime.callJSMethod(Runtime.java:713)
08-13 08:55:50.450 27132 27132 W System.err: at
com.tns.Runtime.callJSMethod(Runtime.java:694)
08-13 08:55:50.450 27132 27132 W System.err: at
com.tns.Runtime.callJSMethod(Runtime.java:684)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFulhKkYIXhOD8WdEMjTvjiGcPhO7C2oks5qfWrZgaJpZM4Jjn0Q
.

@bradmartin
Copy link
Collaborator

I was able to fix a few things with the demo and I have it running successfully on Android devices. For now, ignore the TS errors. I need to set a lot of time to get all of those cleaned up and fixed without breaking the plugin. As for the runtime error, you will likely need to do a new build and run that version, so uninstall any old versions on your device/emulator before running the new build on the device.

@matart15
Copy link

matart15 commented Sep 28, 2016

same issue with 1.0.5

@bradmartin
Copy link
Collaborator

bradmartin commented Sep 28, 2016

Should be fixed with https://github.com/bradmartin/nativescript-videoplayer/releases/tag/1.0.9

I've ran it successfully in a non ng2 app, so it should be okay. Let me know if it persists after the fixes added.

@matart15
Copy link

thank you

@bradmartin
Copy link
Collaborator

All of these errors/warnings should be resolved with latest release. Closing for now, if needed please reopen.

@JillevdW
Copy link

I'm currently experiencing this error. Before I ran into the error where TSLint doesn't recognise UIView and android in the Node Modules folder, and now I'm getting file:///app/tns_modules/nativescript-videoplayer/videoplayer-common.js:6:37: JS ERROR Error: Could not find module './video-source/video-source.android'..

If there's anything you need I'll supply it :)

@pbgc
Copy link

pbgc commented May 16, 2018

@JillevdW @bradmartin I'm having the exact same error

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

5 participants