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

Can't start the script #3

Closed
Jaspix opened this issue Jul 26, 2021 · 6 comments
Closed

Can't start the script #3

Jaspix opened this issue Jul 26, 2021 · 6 comments

Comments

@Jaspix
Copy link

Jaspix commented Jul 26, 2021

Hello, I wanted to try the script out but I'm currently facing some issues. I made sure to follow the installation steps and installed the dependencies.

This is the output from the command line.

[front] Starting rikai-mpv... 
[rikai-mpv] Starting rikai-mpv in python...ache: 272s/150MB
Launching node.js backend...
Connecting from Python...
node:internal/errors:463
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'i18next' imported from /home/andree/.config/mpv/scripts/rikai-mpv/rikaichamp-backend/extension/i18n.js
    at new NodeError (node:internal/errors:370:5)
    at packageResolve (node:internal/modules/esm/resolve:712:9)
    at moduleResolve (node:internal/modules/esm/resolve:753:18)
    at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:867:11)
    at Loader.resolve (node:internal/modules/esm/loader:89:40)
    at Loader.getModuleJob (node:internal/modules/esm/loader:242:28)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

@fxmarty
Copy link
Owner

fxmarty commented Jul 27, 2021

Thanks a lot for your interest! Could you give me your node version (with node --version)?

@Jaspix
Copy link
Author

Jaspix commented Jul 27, 2021

Hello.
my node version is v16.5.0

@fxmarty
Copy link
Owner

fxmarty commented Jul 27, 2021

Thank you, I can reproduce the issue. Looks like imports behave differently between v14 and v16. I will have a look.

@fxmarty
Copy link
Owner

fxmarty commented Jul 27, 2021

Can you try the following?

1/ Delete the extension/ folder in rikaichamp-backend/ folder
2/ yarn install in rikaichamp-backend/ folder
3/ tsc in rikaichamp-backend/ folder
4/ Retry rikai-mpv with F5

Looks like node v16 doesn't like typescript compiled into javascript when it has been done when node v14 was install (though I thought tsc and nodejs were independent).

@Jaspix
Copy link
Author

Jaspix commented Jul 27, 2021

The issues seems resolved now! Though, I don't know what the last log means. This is the output:

[front] Starting rikai-mpv... 
[rikai-mpv] Starting rikai-mpv in python...che: 269s/150MB
Launching node.js backend...
Connecting from Python...
Checking for leftover socket.A-V:  0.000 Cache: 271s/150MB
No leftover socket found.
Creating server.
python <---> node.js socket connected.
Connection acknowledged.
node client connected.
/home/andree/.config/mpv/scripts/rikai-mpv/subtitles_popup_graphics.py:707: UserWarning: Ignore this popup showing as it is likely to fail. Please fill a bug report if this gets inconvenient. This warning won't be shown again.
  app.exec_()

Thanks a lot for your help.

@fxmarty
Copy link
Owner

fxmarty commented Jul 27, 2021

Thank you! I will update the readme in this regard. The logging looks fine to me, as long as you manage to make use of the script :)

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