Comments (6)
[webtorrent] Failed to get node script path
This error can occur if the node
command is not available in your path.
My best guess is that the command is called nodejs
on your system.
I have updated the hook with a more descriptive error.
And also added a script option to specify the command to use.
Version 1.3.3
In mpv/script-opts/webtorrent.conf
, add the following:
node_path=nodejs
from webtorrent-mpv-hook.
I've changed node_path: 'node' to node_path=nodejs and node_path: 'nodejs', but i still got an error:
[input] Command 'loop-file=inf' not found.
[input] Command was defined at /mpv/mpv/input.conf:
2.
Can't load unknown script: /mpv/mpv/scripts/win-hel
per.vbs
Cannot find main.* for any supported scripting backend in: /mpv/mpv/scripts/modules
[assrt]
[assrt] stack traceback:
[assrt] [string "/mpv/mpv/scripts..."]:26:
in main chunk
[assrt] [C]: at 0x0140083340
[assrt] [C]: at 0x01400815c0
[assrt] Lua error: [string "/mpv/mpv/scripts..."]:2
6: module 'modules.AssFormat' not found:
[assrt] no field package.preload['modules.AssFormat']
[assrt] no file ':mpv/mpv/scripts/modules\As
sFormat.lua'
[assrt] no file '\mpv\lua\modules\AssFormat
.lua'
[assrt] no file '\mpv\lua\modules\AssFormat
\init.lua'
[assrt] no file '\mpv\modules\AssFormat.dll
'
[assrt] no file 'mpv\loadall.dll'
[assrt] no file 'mpv\modules.dll'
[assrt] no file '\mpv\loadall.dll'
[file] Cannot open file 'magnet:': Invalid argument
Failed to open magnet:
[webtorrent] Running WebTorrent hook
[webtorrent] Failed to get node script path. Possible causes are "nodejs" not av
ailable in path or incorrect symlink.
Exiting... (Errors when loading file)
'dn' is not recognized as an internal or external command,
operable program or batch file.
'tr' is not recognized as an internal or external command,
operable program or batch file.
'tr' is not recognized as an internal or external command,
operable program or batch file.
'tr' is not recognized as an internal or external command,
operable program or batch file.
'tr' is not recognized as an internal or external command,
operable program or batch file.
'tr' is not recognized as an internal or external command,
operable program or batch file.
also there's no .conf, i'm using windows
from webtorrent-mpv-hook.
OK. so my initial assessment was wrong. On windows it should be called node
.
Please post the output from running the following commands in cmd (not powershell):
node --version
npm list -g webtorrent-mpv-hook
dir %APPDATA%\mpv\scripts
Also when running mpv make sure to put the magnet link withing "quotation marks" if you are not already doing that.
from webtorrent-mpv-hook.
node --version:
v16.14.0
npm list -g webtorrent-mpv-hook:
-- [email protected]
dir:
03/22/2022 06:57 PM <DIR> .
03/22/2022 06:57 PM <DIR> ..
06/30/2020 10:05 AM 14,720 assrt.lua
06/30/2020 10:05 AM <DIR> modules
05/09/2020 08:25 AM 70,699 webm.lua
02/28/2022 04:20 PM <SYMLINK> webtorrent.js [..\..\..\..\Program Files\
node\node_modules\webtorrent-mpv-hook\build\webtorrent.js]
06/30/2020 10:05 AM 571 win-helper.vbs
4 File(s) 85,990 bytes
3 Dir(s) 306,714,107,904 bytes free
from webtorrent-mpv-hook.
The output from dir
is interesting. There are multiple things that differs from the machine i'm testing on.
- Your symlink is relative while for me it's absolute. I would not expect this to matter but maybe it does.
- Your the file seems to be linked to a package install location in
C:\Program Files\node\node_modules
.
However I would expect the package to be installed inC:\Users\You\AppData\Roaming\npm\node_modules
.
Not sure why npm would do that. - Further the node install directory is also different. For me it's
C:\Program Files\nodejs
but for you it appears to beC:\Program Files\node
This really raises more questions than it answers.
If you want you could try editing the webtorrent.js
file and drop some print()
statements into the function getNodeScriptPath()
.
Fore example print(JSON.stringify(realPath, null, 2));
before the try {
clause.
from webtorrent-mpv-hook.
The output from
dir
is interesting. There are multiple things that differs from the machine i'm testing on.
- Your symlink is relative while for me it's absolute. I would not expect this to matter but maybe it does.
- Your the file seems to be linked to a package install location in
C:\Program Files\node\node_modules
.
However I would expect the package to be installed inC:\Users\You\AppData\Roaming\npm\node_modules
.
Not sure why npm would do that.- Further the node install directory is also different. For me it's
C:\Program Files\nodejs
but for you it appears to beC:\Program Files\node
This really raises more questions than it answers.
It's not "installed", both mpv and the node are from zip files
If you want you could try editing the webtorrent.js
print(JSON.stringify(realPath, null, 2));
thanks, i try it
from webtorrent-mpv-hook.
Related Issues (20)
- Custom input-ipc-server setting breaks the script HOT 2
- Use VPS/Seedbox (remote server) HOT 2
- Request: warn about git requirements/dependency in README.md
- Is this supposed to happen? HOT 6
- How to make it deleting downloaded torrent files, after closing mpv? HOT 2
- Allow mpv to recognize file so it can continue download if it closes HOT 3
- Ability to choose which files are downloaded HOT 2
- Add it mplug script directory
- Allow open multiple torrents
- Allow open multiple torrents
- option to stop seeding after downlaoding HOT 1
- Add option to choose where the file is saved for each torrent HOT 2
- Remove `mp.options.read_options(options, 'stats');` HOT 1
- BUG: script is trying to read `stats.conf`/default config file of mpv for info HOT 1
- No video or audio streams selected. problem HOT 1
- How to automatically delete the torrent file after closing mpv? HOT 2
- Add LICENSE
- Does this plugin still work? HOT 1
- Failed to open localhost
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtorrent-mpv-hook.