so I've search all answers on stackoverflow and nothing worked for me, I am getting this error while installing canvas
npm ERR! code 1
npm ERR! path /home/container/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c /tmp/install657476664.sh
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/home/container/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/container/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#1.0.9
npm ERR! node-pre-gyp info using node#17.9.1 | linux | arm64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v102-linux-glibc-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v102-linux-glibc-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas#2.9.3 and node#17.9.1 (node-v102 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v102-linux-glibc-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#17.9.1 | linux | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#17.9.1 | linux | arm64
npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/container/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/container/.cache/node-gyp/17.9.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/container/.cache/node-gyp/17.9.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/container/.cache/node-gyp/17.9.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/container/node_modules/canvas',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! /bin/sh: 1: pkg-config: not found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.13.0-1027-oracle
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/home/container/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/home/container/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
npm ERR! gyp ERR! cwd /home/container/node_modules/canvas
npm ERR! gyp ERR! node -v v17.9.1
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/home/container/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/container/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/container/node_modules/#mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 5.13.0-1027-oracle
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/container/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm ERR! node-pre-gyp ERR! cwd /home/container/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v17.9.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/container/.npm/_logs/2022-07-10T18_11_02_916Z-debug-0.log
Use #napi-rs/canvas instead of node-canvas.
It doesn't require build tools, is a new library and provides better performance compared to node-canvas. It uses skia graphics under the hood which is faster than cairo used by node-canvas. It also provides better fonts api.
The API is basically the same. It should be pretty much easy to migrate to #napi-rs/canvas. It also offers native support for more image formats out-of-the-box. The source code of #napi-rs/canvas can be found here
const { createCanvas } = require("#napi-rs/canvas");
const canvas = createCanvas(width, height);
const ctx = canvas.getContext("2d");
// do some canvas here
// asynchronously encode canvas into png image
const img = await canvas.encode("png");
// or synchronous api like node-canvas
const img = canvas.toBuffer("image/png");
the solution is already given in github discussion & stackoverflow
https://github.com/Automattic/node-canvas/issues/1447
How can I ovecome this error in npm install?
I had similar case with installing sqlite3 on my M1 Pro Macbook. The solution bears almost no difference to this answer; it'll probably work.
Related
During my free time I develop a discord bot, but when I try to install discord-canvas-easy. Error. Someone have a solution ?
I'm on MacBook Pro M1 Pro (intel chip)
luca#MBP-M1Pro-Luca IweZix-2.1 % npm i discord-canvas-easy#3.2.0
npm WARN deprecated #discordjs/collection#0.7.0: no longer supported
npm WARN deprecated #discordjs/builders#0.16.0: no longer supported
npm ERR! code 1
npm ERR! path /Users/luca/Library/CloudStorage/OneDrive-Personnel/IweZix-2.1/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! Failed to execute '/Users/luca/.nvm/versions/node/v16.14.0/bin/node /Users/luca/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/luca/Library/CloudStorage/OneDrive-Personnel/IweZix-2.1/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/luca/Library/CloudStorage/OneDrive-Personnel/IweZix-2.1/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#1.0.10
npm ERR! node-pre-gyp info using node#16.14.0 | darwin | arm64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.10.2/canvas-v2.10.2-node-v93-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.10.2/canvas-v2.10.2-node-v93-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas#2.10.2 and node#16.14.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.10.2/canvas-v2.10.2-node-v93-darwin-unknown-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.3.0
npm ERR! gyp info using node#16.14.0 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.3.0
npm ERR! gyp info using node#16.14.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.10 found at "/opt/homebrew/opt/python#3.9/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/python#3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/luca/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/luca/Library/CloudStorage/OneDrive-Personnel/IweZix-2.1/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/luca/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/luca/Library/Caches/node-gyp/16.14.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/luca/Library/Caches/node-gyp/16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/luca/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/luca/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/luca/Library/CloudStorage/OneDrive-Personnel/IweZix-2.1/node_modules/canvas',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! /bin/sh: pkg-config: command not found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/luca/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit
{...}
I try to update node, update npm, install latest discord-canvas-easy
i want to install sqlite via "npm install sqlite3" on my visual studio project.
But for no reason I got an error.
i am using node 16.14.2 and npm 8.5.0
I tried to install an specific version of sqlite3 via "npm install sqlite3#x.x.x" but this does not work at all. So I come up with the idea to uninstall sqlite from my Mac system and reinstall it.
When I check the installed Version of sqlite in terminal I got this :
3.37.0 2021-12-09 01:34:53 9ff244ce0739f8ee52a3e9671adb4ee54c83c640b02e3f9d185fd2f9a179aapl
when I try to uninstall it with "npm uninstall sqlite3" and check again the Version, I got the same output.
This is the error in Visual Studio:
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.11.0
npm ERR! node-pre-gyp info using node#16.14.2 | darwin | arm64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3#5.0.2 and node#16.14.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.8.9 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
npm ERR! gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/kaan/Library/Caches/node-gyp/16.14.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/kaan/Library/Caches/node-gyp/16.14.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/kaan/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! /bin/sh: python: command not found
npm ERR! make: *** [Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c] Error 127
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/kaan/Desktop/JS/reservieren/main/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.4.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/kaan/Desktop/JS/reservieren/main/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/kaan/Desktop/JS/reservieren/main/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.14.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
try this
npm uninstall sqlite3
npm cache clean
npm install sqlite3
For all that got the same issue:
for me it worked when I installed an older version of node (like 15.0.0) with nvm install 15.0.0 and then installing sqlite3 on my project.
when entering a command npm audit fix --force I get an error
The error as it appears on the cmd is as follows:
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating sqlite3 to 4.2.0,which is a SemVer major change.
npm ERR! code 1
npm ERR! path C:\FluffyBot\node_modules\sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! �믮������ ������⥫쭠� ᡮઠ ��⮢ � �⮬ �襭��. �⮡� ������� ��ࠫ������ ᡮ��, ������� ��ࠬ��� "/m".
npm ERR! unpack_sqlite_dep
npm ERR! "C:\Program" �� ���� ����७��� ��� ���譥�
npm ERR! ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
npm ERR! C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" �����訫��� � ����� 1. [C:\FluffyBot\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.11.0
npm ERR! node-pre-gyp info using node#16.6.1 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3#4.2.0 and node#16.6.1 (node-v93 ABI, unknown) (falling back
to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.18 found at "C:\Python27\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1759) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! (node:12452) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn C:\Python27\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\FluffyBot\\node_modules\\sqlite3\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\ILYA\\AppData\\Local\\node-gyp\\Cache\\16.6.1\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\ILYA\\AppData\\Local\\node-gyp\\Cache\\16.6.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\ILYA\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.6.1\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\FluffyBot\\node_modules\\sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\FluffyBot\\node_modules\\sqlite3\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | win32 | x64
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\FluffyBot\\node_modules\\sqlite3\\lib\\binding\\node-v93-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\FluffyBot\\node_modules\\sqlite3\\lib\\binding\\node-v93-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd C:\FluffyBot\node_modules\sqlite3
npm ERR! gyp ERR! node -v v16.6.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack 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 build --fallback-to-build --module=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\FluffyBot\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\FluffyBot\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\FluffyBot\node_modules\sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.6.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
I tried using earlier and later versions but it didn't help.Could some one have a look at the error and let me know what steps I need to do to rectify this..
I am on node.js 16.6.1 and npm 7.20.3
i m posting the output ..I can t understand anything please tell me what to do
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code 1
npm ERR! path D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102 --python=python2.7 --msvs_version=2017' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#1.0.6
npm ERR! node-pre-gyp info using node#17.1.0 | win32 | x64
npm ERR! node-pre-gyp info check checked for "D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release\canvas.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v102-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v102-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas#2.8.0 and node#17.1.0 (node-v102 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v102-win32-unknown-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.0
npm ERR! gyp info using node#17.1.0 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.0
npm ERR! gyp info using node#17.1.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2017
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.11.31911.196) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1062:16)
npm ERR! gyp ERR! System Windows_NT 10.0.10240
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release\canvas.node" "--module_name=canvas" "--module_path=D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102" "--python=python2.7" "--msvs_version=2017"
npm ERR! gyp ERR! cwd D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas
npm ERR! gyp ERR! node -v v17.1.0
npm ERR! gyp ERR! node-gyp -v v8.4.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102 --python=python2.7 --msvs_version=2017' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (D:\nft\hashlips_art_engine-1.1.2_update\node_modules#mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1062:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.10240
npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\nft\hashlips_art_engine-1.1.2_update\node_modules\#mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd D:\nft\hashlips_art_engine-1.1.2_update\node_modules\canvas
npm ERR! node-pre-gyp ERR! node -v v17.1.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.6
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache_logs\2021-11-10T15_29_35_648Z-debug.log
One of the packages makes use of node-gyp. Node-gyp is a library to build native-addons for nodejs, that are OS-specific (see node-gyp)
To fix these issue, you need to install Python and Visual Studio Build Tools on windows.
A "simple" method to do this, is to either install it directly via the node installer for windows, or use the npm package windows-build-tools(the README also has a link to the node installer method).
I want to play mp3 file.
When I use this code to run mp3 in Discord bot:
channel.join().then((connection) => {
connection.play('audio.mp3');
I'm getting an error.Error is as follows:
C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\prism-media\src\util\loader.js:12
throw new Error(errorLog.join('\n'));
^
Error: Error: Cannot find module '#discordjs/opus'
...
I understand that I need to install the # discordjs / opus module, but,
i'm trying to install the #discordjs/opus package, but during the install process I get the following error:
C:\Users\user\Desktop\bots\imamhatipoglu>npm i #discordjs/opus
npm ERR! code 1
npm ERR! path C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus\prebuild\node-v93-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus\prebuild\node-v93-napi-v3-win32-x64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.3.2
npm ERR! node-pre-gyp info using node#16.0.0 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus\prebuild\node-v93-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.5.0/opus-v0.5.0-node-v93-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.5.0/opus-v0.5.0-node-v93-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for #discordjs/opus#0.5.0 and node#16.0.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.5.0/opus-v0.5.0-node-v93-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.0.0 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.0.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.4 found at "C:\Users\user\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp info find VS using VS2019 (16.9.31205.134) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! (node:2764) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn C:\Users\user\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\user\\Desktop\\bots\\imamhatipoglu\\node_modules\\#discordjs\\opus\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\user\\AppData\\Local\\node-gyp\\Cache\\16.0.0\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\user\\AppData\\Local\\node-gyp\\Cache\\16.0.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\user\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.0.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\user\\Desktop\\bots\\imamhatipoglu\\node_modules\\#discordjs\\opus',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\Users\\user\\Desktop\\bots\\imamhatipoglu\\node_modules\\#discordjs\\opus\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: C:\Users\user\AppData\Local\node-gyp\Cache\16.0.0\common.gypi not found (cwd: C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus) while reading includes of binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\user\\Desktop\\bots\\imamhatipoglu\\node_modules\\#discordjs\\opus\\prebuild\\node-v93-napi-v3-win32-x64-unknown-unknown\\opus.node" "--module_name=opus" "--module_path=C:\\Users\\user\\Desktop\\bots\\imamhatipoglu\\node_modules\\#discordjs\\opus\\prebuild\\node-v93-napi-v3-win32-x64-unknown-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus
npm ERR! gyp ERR! node -v v16.0.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus\prebuild\node-v93-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus\prebuild\node-v93-napi-v3-win32-x64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\node-pre-gyp\lib\util\compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\Desktop\\bots\\imamhatipoglu\\node_modules\\#discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\user\Desktop\bots\imamhatipoglu\node_modules\#discordjs\opus
npm ERR! node-pre-gyp ERR! node -v v16.0.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.3.2
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2021-04-30T22_48_11_083Z-debug.log
I tried to open cmd as an administrator, but the situation is the same.
My node version: v16
If you are a Windows user, you must have the build-tools first installed.
As it is written in the v12 discord guide, run this command to get them: npm install --global --production --vs2015 --add-python-to-path windows-build-tools
MrNossiom