Мне нужны были ffmpeg-binaries для воспроизведения аудиофайла через голосовой канал с моим ботом discord, но npm просто возвращает ошибку.
Сообщение об ошибке:
C:\Users\malte>npm install ffmpeg-binaries --save
> lzma-native@3.0.8 install C:\Users\malte\node_modules\lzma-native
> node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
node-pre-gyp ERR! Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v67-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@11.1.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v67-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@11.1.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\malte\AppData\Local\Programs\Python\Python36-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:289:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\malte\\node_modules\\lzma-native\\binding-v3.0.8-node-v67-win32-x64\\lzma_native.node" "--module_name=lzma_native" "--module_path=C:\\Users\\malte\\node_modules\\lzma-native\\binding-v3.0.8-node-v67-win32-x64"
gyp ERR! cwd C:\Users\malte\node_modules\lzma-native
gyp ERR! node -v v11.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\malte\AppData\Local\Programs\Python\Python36-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gypnode-pre-gyp ERR!ERR! build errorstack
node-pre-gypgyp ERR!ERR! stackstack at ChildProcess.exithandler (child_process.js:289:12)
Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\malte\node_modules\lzma-native\binding-v3.0.8-node-v67-win32-x64\lzma_native.node --module_name=lzma_native --module_path=C:\Users\malte\node_modules\lzma-native\binding-v3.0.8-node-v67-win32-x64' (1)
gypnode-pre-gyp ERR! ERR!stack at ChildProcess.<anonymous> (C:\Users\malte\node_modules\lzma-native\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp gypERR! ERR!stack at ChildProcess.emit (events.js:182:13)
stacknode-pre-gyp at maybeClose (internal/child_process.js:970:16)
gyp ERR!ERR! stackstack at maybeClose (internal/child_process.js:970:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
node-pre-gyp ERR!gyp stackERR! at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
node-pre-gyp ERR! SystemSystem Windows_NT 10.0.17134
Windows_NT 10.0.17134
gyp ERR! node-pre-gypcommand "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\malte\\node_modules\\lzma-native\\binding-v3.0.8-node-v67-win32-x64\\lzma_native.node" "--module_name=lzma_native" "--module_path=C:\\Users\\malte\\node_modules\\lzma-native\\binding-v3.0.8-node-v67-win32-x64"
ERR! gypcommand "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\malte\\node_modules\\lzma-native\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
ERR!node-pre-gyp cwdERR! C:\Users\malte\node_modules\lzma-native
gypcwd C:\Users\malte\node_modules\lzma-native
ERR!node-pre-gyp node -vERR! v11.1.0
node -vgyp v11.1.0
ERR!node-pre-gyp node-gyp -vERR! v3.8.0
node-pre-gyp -vgyp v0.6.39
node-pre-gyp ERR!ERR! not oknot ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\malte\node_modules\lzma-native\binding-v3.0.8-node-v67-win32-x64\lzma_native.node --module_name=lzma_native --module_path=C:\Users\malte\node_modules\lzma-native\binding-v3.0.8-node-v67-win32-x64' (1)
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\malte\package.json'
npm WARN discord.js@11.4.2 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN malte No description
npm WARN malte No repository field.
npm WARN malte No README data
npm WARN malte No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native@3.0.8 install: `node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lzma-native@3.0.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\malte\AppData\Roaming\npm-cache\_logs\2019-01-05T18_39_28_480Z-debug.log
Я использую Windows 10 с 64-битной архитектурой. Я не видел, чтобы кто-нибудь еще в Интернете сталкивался с этой ошибкой. Если вы перейдете по адресу https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v67-win32-x64.tar.gz (как показано в сообщении об ошибке), то появится 404. Я думаю, что это то, что вызывает ошибку, но я не знаю, как ее исправить. Discord.js и нет описания, поле репозитория, данные readme, предупреждения о лицензии, вероятно, не имеют значения, так как они происходят каждый раз, когда я устанавливаю API, используя npm. Насколько я знаю, я не могу их исправить, и это ничего не изменит. полный журнал, который упоминается в сообщении об ошибке:
(это было слишком большим, чтобы поместиться здесь)