I needed ffmpeg-binaries for playing a audio file thru a voice channel with my discord bot but npm just returns an error.
Error message:
C:\Users\malte>npm install ffmpeg-binaries --save
> [email protected] 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 [email protected] and [email protected] (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 [email protected] and [email protected] (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 [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 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! [email protected] 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 [email protected] 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
I am using windows 10 with 64bit architecture. I havent seen that anyone else on the internet has encountered this error. If you go to https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v67-win32-x64.tar.gz (as shown in the error) it says 404. I think this is what is causing the error to happen but i dont know how to fix it. The discord.js and the no description, repository field, readme data, license warns are probably irrelevant since they happen everytime i install an api using npm. As far as i know i cant fix them and it dosnt effect anything. the complete log that is mentioned in the error is this:
(it was to large to fit here)
python --version
and edit your question.