I am going through the HAPI js tutorial Authentication section(http://hapijs.com/tutorials/auth?lang=en_US), which requires the "bcrypt". So I did "npm install bcrypt --save". But this is giving node-gyp errors like php was missing. So I followed the instructions given here :
https://github.com/nodejs/node-gyp#installation
I even did :npm install --global --production windows-build-tools
But now it's throwing error :
"CL.exe" exited with code -1073741511
I have installed everything they asked for yet it's not allowing to install bcrypt. What do I do?
As simple tutorial exercise has taken me 2 days of research without any solution. Why use such dependency driven packages in your tutorial?
This is the actual console log I am getting on doing npm install bcrypt :
m WARN package.json personal_assistant#1.0.0 No README data
bcrypt#0.8.7 install D:\learn\personal_assistant\server\node_modules\bcrypt
node-gyp rebuild
\learn\personal_assistant\server\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\
\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
ilding the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code -1073741511. [D:\learn\personal_
sistant\server\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
p ERR! build error
p ERR! stack Error: `C:\Program Files\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
p ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
p ERR! stack at emitTwo (events.js:87:13)
p ERR! stack at ChildProcess.emit (events.js:172:7)
p ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
p ERR! System Windows_NT 6.1.7600
p ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
p ERR! cwd D:\learn\personal_assistant\server\node_modules\bcrypt
p ERR! node -v v4.5.0
p ERR! node-gyp -v v3.4.0
p ERR! not ok
m ERR! Windows_NT 6.1.7600
m ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "--save"
m ERR! node v4.5.0
m ERR! npm v2.15.9
m ERR! code ELIFECYCLE
m ERR! bcrypt#0.8.7 install: `node-gyp rebuild`
m ERR! Exit status 1
m ERR!
m ERR! Failed at the bcrypt#0.8.7 install script 'node-gyp rebuild'.
m ERR! This is most likely a problem with the bcrypt package,
m ERR! not with npm itself.
m ERR! Tell the author that this fails on your system:
m ERR! node-gyp rebuild
m ERR! You can get information on how to open an issue for this project with:
m ERR! npm bugs bcrypt
m ERR! Or if that isn't available, you can get their info via:
m ERR!
m ERR! npm owner ls bcrypt
m ERR! There is likely additional logging output above.
m ERR! Please include the following file with any support request:
m ERR! D:\learn\personal_assistant\server\npm-debug.log
Error code -1073741511 translates to 0xC0000139, which is apparently "DLL not found".
That leads me to think there's something wrong with your C++ build toolchain, which is required to build the native bits of the bcrypt library.
I know this doesn't help too much, but it Works On My Machine:
C:\Users\X\Desktop\xx>npm i --save bcrypt
npm info it worked if it ends with ok
npm info using npm#3.8.6
npm info using node#v6.1.0
npm info ok
npm info it worked if it ends with ok
npm info using npm#3.5.0
npm info using node#v6.1.0
> bcrypt#0.8.7 install C:\Users\X\Desktop\xx\node_modules\bcrypt
> node-gyp rebuild
C:\Users\X\Desktop\xx\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Users\X\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp#3.0.3
gyp info using node#6.1.0 | win32 | x64
gyp http GET https://nodejs.org/download/release/v6.1.0/node-v6.1.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v6.1.0/node-v6.1.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v6.1.0/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v6.1.0/win-x86/node.lib
gyp http GET https://nodejs.org/download/release/v6.1.0/win-x64/node.lib
gyp http 200 https://nodejs.org/download/release/v6.1.0/win-x86/node.lib
gyp http 200 https://nodejs.org/download/release/v6.1.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v6.1.0/win-x64/node.lib
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\X\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\X\\Desktop\\xx\\node_modules\\bcrypt\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\X\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\X\\.node-gyp\\6.1.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\X\\.node-gyp\\6.1.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\X\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\X\\Desktop\\xx\\node_modules\\bcrypt',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\X\\Desktop\\xx\\node_modules\\bcrypt\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
blowfish.cc
bcrypt.cc
bcrypt_node.cc
..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsigned char', possible loss of data [C:\Users\X\Desktop\xx\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(76): warning C4244: 'argument' : conversion from 'ssize_t' to 'unsigned char', possible loss of data [C:\Users\X\Desktop\xx\node_modules\bcrypt\build\bcrypt_lib .vcxproj]
..\src\bcrypt_node.cc(229): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [C:\Users\X\Desktop\xx\node_modules\bcrypt\build\bcrypt_lib.vcxpr oj]
..\src\bcrypt_node.cc(230): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [C:\Users\X\Desktop\xx\node_modules\bcrypt\build\bcrypt_lib.vcxpr oj]
win_delay_load_hook.c
Creating library C:\Users\X\Desktop\xx\node_modules\bcrypt\build\Release\bcrypt_lib.lib and object C:\Users\X\Desktop\xx\node_modules\bcrypt\build\Release\bcrypt_lib.exp
Generating code
Finished generating code
bcrypt_lib.vcxproj -> C:\Users\X\Desktop\xx\node_modules\bcrypt\build\Release\\bcrypt_lib.node
gyp info ok
npm info lifecycle bindings#1.2.1~postinstall: bindings#1.2.1
npm info lifecycle nan#2.3.5~postinstall: nan#2.3.5
npm info lifecycle bcrypt#0.8.7~postinstall: bcrypt#0.8.7
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\X\Desktop\xx\package.json'
C:\Users\X\Desktop\xx
└─┬ bcrypt#0.8.7
├── bindings#1.2.1
└── nan#2.3.5
npm info ok
C:\Users\X\Desktop\xx>
As for your question,
Why use such dependency driven packages in your tutorial?
-- that's just the way of the Node.js/NPM world. Lots of small packages that do one thing (and supposedly do it well, though that's not always the case)...
Related
The error I get whenever I try and download better-sqlite3:
npm ERR! code 1
npm ERR! path C:\Windows\System32\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild --release
npm ERR! MSBUILD : error MSB1009: Project file does not exist.
npm ERR! Switch: build/binding.sln
npm ERR! prebuild-install warn install No prebuilt binaries found (target=17.8.0 runtime=node arch=x64 libc= platform=win32)
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.8.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.8 found at "C:\Users\jagri\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.33027.164) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\jagri\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\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:\\Windows\\System32\\node_modules\\better-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\\jagri\\AppData\\Local\\node-gyp\\Cache\\17.8.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=C:\\Users\\jagri\\AppData\\Local\\node-gyp\\Cache\\17.8.0',
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\\\\jagri\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\17.8.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Windows\\System32\\node_modules\\better-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:\\Windows\\System32\\node_modules\\better-sqlite3\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\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\2019\BuildTools\MSBuild\Current\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:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
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" "rebuild" "--release"
npm ERR! gyp ERR! cwd C:\Windows\System32\node_modules\better-sqlite3
npm ERR! gyp ERR! node -v v17.8.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
I found many solutions on stackoverflow as well as github. I tried all of them however it didnt work. I have downloaded node-gyp as well.
Inform me if extra info is needed. Hope you can help
I really wanted to install a fast redis driver for my app, so I decided to use redis-fast-driver, but I can't install it from npm. Everytime I run the command:
npm install redis-fast-driver --save
I get this message:
C:\Users\Michal\Desktop\projekty\steam_user>npm install redis-fast-driver
npm ERR! code 1
npm ERR! path C:\Users\Michal\Desktop\projekty\steam_user\node_modules\redis-fast-driver
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR! hiredis.c
npm ERR! C:\Users\Michal\Desktop\projekty\steam_user\node_modules\redis-fast-driver\deps\hiredis\hiredis.c(37,10): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\Users\Michal\Desktop\projekty\steam_user\node_modules\redis-fast-driver\build\deps\hiredis.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.1.0
npm ERR! gyp info using node#16.17.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Python310\python.exe"
npm ERR! gyp info find VS using VS2022 (17.3.32825.248) found at:
npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Users\\Michal\\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\\Michal\\Desktop\\projekty\\steam_user\\node_modules\\redis-fast-driver\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\Michal\\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\\Michal\\AppData\\Local\\node-gyp\\Cache\\16.17.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=C:\\Users\\Michal\\AppData\\Local\\node-gyp\\Cache\\16.17.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Michal\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\Michal\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.17.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Michal\\Desktop\\projekty\\steam_user\\node_modules\\redis-fast-driver',
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\\Michal\\Desktop\\projekty\\steam_user\\node_modules\\redis-fast-driver\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\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\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Users\Michal\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:201:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Michal\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Michal\Desktop\projekty\steam_user\node_modules\redis-fast-driver
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Michal\AppData\Local\npm-cache\_logs\2022-09-05T22_19_53_416Z-debug-0.log
I honestly have no clue what to do. I've tried googling solutions for the errors that pop up, but nothing seems to work.
I use:https://github.com/saltyshiomix/nextron
I want to install canvas. Via yarn add canvas. Unfortunately it gives an error. Any sure information on what I should do?
I have tried in truth, in every way. I am using the first help, on stackoverflow. I am hoping that someone has been through the same thing. There is not one specific error so that I can do it myself. Thank you for your help. :)
PS C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron> yarn add canvas
yarn add v1.22.17
warning ..\package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning electron-builder > dmg-builder > dmg-license#1.0.11: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ canvas#2.9.1
info All dependencies
└─ canvas#2.9.1
$ electron-builder install-app-deps
• electron-builder version=23.0.3
• loaded configuration file=C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\electron-builder.yml
• rebuilding native dependencies dependencies=canvas#2.9.1, canvas#2.9.1 platform=win32 arch=x64
• rebuilding native dependency name=canvas version=2.9.1
• rebuilding native dependency name=canvas version=2.9.1
⨯ cannot execute cause=exit status 1
yarn run v1.22.17
$ node-pre-gyp install --fallback-to-build
Projekty w tym rozwi�zaniu s� kompilowane pojedynczo. Aby umo�liwi� kompilacj� r�wnoleg��, dodaj prze��cznik "-m".
Backend.cc
c:\users\kulti\.electron-gyp\18.2.2\include\node\v8-traced-handle.h(240): error C2061: b��d sk�adniowy: identyfikator "TracedGlobal<`template-type-parameter-1'>" [C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\canvas.vcxproj]
c:\users\kulti\.electron-gyp\18.2.2\include\node\v8-traced-handle.h(335): note: zobacz odwo�anie do klasy klasa szablon; wyst�pienie "v8::TracedGlobal<T>" jest kompilowane
c:\users\kulti\.electron-gyp\18.2.2\include\node\v8-traced-handle.h(240): error C2334: nieoczekiwany(e) token(y) poprzedzaj�ce ":"; pomijanie tre�ci widocznych funkcji [C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\canvas.vcxproj]
c:\users\kulti\.electron-gyp\18.2.2\include\node\v8-traced-handle.h(22): fatal error C1075: "{": nie znaleziono zgodnego tokenu [C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\canvas.vcxproj]
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\KULTI\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v18.2' (1)
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
warning ..\..\..\..\..\package.json: No license field
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#1.0.9
node-pre-gyp info using node#16.15.0 | win32 | x64
node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-electron-v18.2-win32-unknown-x64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-electron-v18.2-win32-unknown-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for canvas#2.9.1 and electron#18.2.2 (electron-v18.2 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-electron-v18.2-win32-unknown-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp#9.0.0
gyp info using node#16.15.0 | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#9.0.0
gyp info using node#16.15.0 | win32 | x64
gyp info find Python using Python version 3.8.3 found at "C:\Python38\python.exe"
gyp info find VS using VS2017 (15.9.28307.1093) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python38\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\KULTI\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\KULTI\\Desktop\\PROJEKTY\\selectVideoTiktok_electron\\node_modules\\tiktok-scraper\\node_modules\\canvas\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\KULTI\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\KULTI\\.electron-gyp\\18.2.2\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\KULTI\\.electron-gyp\\18.2.2',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\KULTI\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\KULTI\\\\.electron-gyp\\\\18.2.2\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\KULTI\\Desktop\\PROJEKTY\\selectVideoTiktok_electron\\node_modules\\tiktok-scraper\\node_modules\\canvas',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\KULTI\\Desktop\\PROJEKTY\\selectVideoTiktok_electron\\node_modules\\tiktok-scraper\\node_modules\\canvas\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#9.0.0
gyp info using node#16.15.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\KULTI\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.19044
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\KULTI\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\KULTI\\Desktop\\PROJEKTY\\selectVideoTiktok_electron\\node_modules\\tiktok-scraper\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\KULTI\\Desktop\\PROJEKTY\\selectVideoTiktok_electron\\node_modules\\tiktok-scraper\\node_modules\\canvas\\build\\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=electron-v18.2"
gyp ERR! cwd C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas
gyp ERR! node -v v16.15.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\KULTI\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v18.2' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\#mapbox\node-pre-gyp\lib\util\compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Windows_NT 10.0.19044
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\KULTI\\Desktop\\PROJEKTY\\selectVideoTiktok_electron\\node_modules\\#mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas
node-pre-gyp ERR! node -v v16.15.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
node-pre-gyp ERR! not ok
error Command failed with exit code 1.
command='C:\Program Files\nodejs\node.exe' 'C:\Users\KULTI\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js' run install
workingDir=C:\Users\KULTI\Desktop\PROJEKTY\selectVideoTiktok_electron\node_modules\tiktok-scraper\node_modules\canvas
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
i am trying to install quick.db but everytime i do i get an error.
see below:
npm ERR! code 7
npm ERR! path C:\Users\Ismael\OneDrive\Desktop\elysium dashboard\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || npm run build-release
npm ERR! > better-sqlite3#7.5.1 build-release
npm ERR! > node-gyp rebuild --release
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=18.0.0 runtime=node arch=x64 libc= platform=win32)
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#18.0.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\Ismael\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.32126.315) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Ismael\AppData\Local\Programs\Python\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'D:\\Users\\Ismael\\AppData\\Roaming\\nvm\\v18.0.0\\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\\Ismael\\OneDrive\\Desktop\\elysium dashboard\\node_modules\\better-sqlite3\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'D:\\Users\\Ismael\\AppData\\Roaming\\nvm\\v18.0.0\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\Ismael\\AppData\\Local\\node-gyp\\Cache\\18.0.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=C:\\Users\\Ismael\\AppData\\Local\\node-gyp\\Cache\\18.0.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=D:\\Users\\Ismael\\AppData\\Roaming\\nvm\\v18.0.0\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\Ismael\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\18.0.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Ismael\\OneDrive\\Desktop\\elysium dashboard\\node_modules\\better-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:\\Users\\Ismael\\OneDrive\\Desktop\\elysium dashboard\\node_modules\\better-sqlite3\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\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! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe ENOENT
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:283:19)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Users\\Ismael\\AppData\\Roaming\\nvm\\v18.0.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd C:\Users\Ismael\OneDrive\Desktop\elysium dashboard\node_modules\better-sqlite3
npm ERR! gyp ERR! node -v v18.0.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ismael\AppData\Local\npm-cache\_logs\2022-04-24T01_25_04_197Z-debug-0.log
i have tried alot of solutions suggested on different sites including stackoverflow but nothing seemed to work installed windows build tools, python, c++, node-gyp, fixed environment variables and im on the latest release of node (notice that it didnt work on node v17.6.0 either) if this could help, i upgrade/downgrade versions using nvm.
i'd like to note that i also had this problem with installing it back when v12 was the latest version and i just upgraded to it and it worked but now upgrading or downgrading doesnt work at all.
I am trying to "node-gyp configure" to try to get the ms sql server driver. However, initially it said binding.gypi was missing or something to that effect. Now however it is saying common.gypi not found. So I created a text document relabelled it as common.gypi and pasted the code from the file common.gypi that I found in the github repository into the file and saved it and closed it and ran "node-gyp configure". This is the output.
D:\Node\SQLServerConnector\node-sqlserver-master>node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp#0.10.6
gyp info using node#0.10.15 | win32 | ia32
gyp info spawn python
gyp info spawn args [ 'C:\Users\Suresh\AppData\Roaming\npm\node_modules\n
ode-gyp\gyp\gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'D:\Node\SQLServerConnector\node-sqlserver-master\buil
d\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'D:\Node\SQLServerConnector\node-sqlserver-master\comm
on.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Suresh\AppData\Roaming\npm\node_modules\n
ode-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Suresh\.node-gyp\0.10.15\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\Suresh\.node-gyp\0.10.15',
gyp info spawn args '-Dmodule_root_dir=D:\Node\SQLServerConnector\node-sqls
erver-master',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'D:\Node\SQLServerConnector\node-sqlserver-master\buil
d',
gyp info spawn args '-Goutput_dir=.' ]
gyp: C:\Users\Suresh.node-gyp\0.10.15\common.gypi not found (cwd: D:\Node\SQLSe
rverConnector\node-sqlserver-master) while reading includes of binding.gyp while
trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Suresh\AppData\Roaming\npm
\node_modules\node-gyp\lib\configure.js:424:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:
12)
gyp ERR! System Windows_NT 6.1.7600
gyp ERR! command "node" "C:\Users\Suresh\AppData\Roaming\npm\node_modules\
\node-gyp\bin\node-gyp.js" "configure"
gyp ERR! cwd D:\Node\SQLServerConnector\node-sqlserver-master
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
Please help me resolve this error.
I've had luck with:
rm -rf ~/.node_gyp
cd myAwesomeProject
npm install
npm rebuild
when switching between node 4 and 0.12.4
Seems to be a common issue these days.
You can check https://github.com/TooTallNate/node-gyp/issues/313 and https://github.com/TooTallNate/node-gyp/issues/376 to see if any of these solutions solve your issue.
Particularly, you can:
Remove old dir ~/.node_gyp and run npm install
Copy an older version (ex: ~/.node-gyp/0.10.11/) to the complying path.
Copy the latest version to the complying path.
Chime in this thread to get help.
My solution (on windows) was to go to %appdata%/npm-gypi and delete the folder, after that I could install ganache (which I guess uses gypi as a dependency).
I sure hope this helps someone.. it has been 3 hours of troubleshooting for me..
Edit: Oh and I deleted the npm-cache too
Error encountered on Windows using Node 18.10.0
PS C:\Users\Mike\git\ngp-projects-api> npm rebuild
more information.
npm ERR! code 1
npm ERR! path C:\Users\Mike\git\ngp-projects-api\node_modules\gcstats.js
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.1.0
npm ERR! gyp info using node#18.10.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.7 found at "C:\Users\Mike\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.10.0/node-v18.10.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.10.0/node-v18.10.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.10.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v18.10.0/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v18.10.0/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v18.10.0/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.10.0/SHASUMS256.txt
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.10.0/win-x86/node.lib failed, reason: connect ETIMEDOUT 2606:4700:10::6814:162e:443
npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (C:\Users\Mike\AppData\Local\nvs\node\18.10.0\x64\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:513:28)
npm ERR! gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:494:9)
npm ERR! gyp ERR! stack at TLSSocket.emit (node:events:525:35)
npm ERR! gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Users\\Mike\\AppData\\Local\\nvs\\node\\18.10.0\\x64\\node.exe" "C:\\Users\\Mike\\AppData\\Local\\nvs\\node\\18.10.0\\x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Mike\git\ngp-projects-api\node_modules\gcstats.js
npm ERR! gyp ERR! node -v v18.10.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok
Note: Not specifying --nodedir CLI option
Problem is related to npm using IPv6 address that is timing out inside corporate Intranet
ETIMEDOUT 2606:4700:10::6814:162e:443
Work-around was to copy the entire existing cache directory for Node 18.9.1 to a new cache directory called 18.10.0
e,g,
C:\Users\Mike\AppData\Local\node-gyp\Cache\18.9.1 --> C:\Users\Mike\AppData\Local\node-gyp\Cache\18.10.0
Solution worked for me but doesn't seem kosher
I was fortunate to have an existing cache folder to copy from my old Node installation (Node 18.9.1) before upgrading to Node 18.10.0
Related Node GitHub issue
One line command in powershell:
node "C:\Users\$($env:username)\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" install
The node-gyp.js is in global node_module.