I tried installing the ldap-client node module for nodejs on my local windows machine by running this command, npm install --save ldap-client.
It gives the error as attached
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
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"
gyp ERR! cwd C:\workspace\AJNSDemoProject
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
I installed the OpenLDAP client libraries from here (http://www.openldap.org/software/download/) as tgz and extracted that and put the folder in my project root folder.
I am using latest node version 8.10.0
Could you please advice whats wrong in my case?
Thanks
Debug log when run "node-gyp rebuild" command
C:\workspace\AJNSDemoProject>node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp#3.6.2
gyp info using node#8.10.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Python\python.exe
gyp info spawn args [ 'C:\\Users\\niyaza.fazlullah\\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 '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\workspace\\AJNSDemoProject\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\niyaza.fazlullah\\.node-gyp\\8.10.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\\niyaza.fazlullah\\.node-gyp\\8.10.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\niyaza.fazlullah\\.node-gyp\\8.10.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\workspace\\AJNSDemoProject',
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:\\workspace\\AJNSDemoProject\\build',
gyp info spawn args '-Goutput_dir=.' ]
Warning: Missing input files:
C:\workspace\AJNSDemoProject\build\..\src\binding.cc
gyp info spawn C:\Program Files (x86)\MSBuild\14.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.
binding.cc
c1xx : fatal error C1083: Cannot open source file: '..\src\binding.cc': No such file or directory [C:\workspace\AJNSDem
oProject\build\binding.vcxproj]
win_delay_load_hook.cc
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\niyaza.fazlullah\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\workspace\AJNSDemoProject
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Related
I'm trying to install Parcel, I used both NPM and Yarn, and tried several Node.js versions (14, 16, 10...) but nothing worked for me, I always get the same error. I'm using Windows 10 32bit and Python
gyp info it worked if it ends with ok
gyp info using node-gyp#8.2.0
gyp info using node#16.13.0 | win32 | ia32
gyp info find Python using Python version 3.11.0 found at \"C:\\Users\\ALI\\AppData\\Local\\Programs\\Python\\Python311-32\\python.exe\"
gyp info find VS using VS2017 (15.9.28307.1831) found at:
gyp info find VS \"C:\\Program Files\\Microsoft Visual Studio\\2017\\BuildTools\"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\\Users\\ALI\\AppData\\Local\\Programs\\Python\\Python311-32\\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\\\Program Files\\\\nodejs\\\\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 '-I',
gyp info spawn args 'C:\\\\Users\\\\ALI\\\\Desktop\\\\osamasoliman\\\\node_modules\\\\msgpackr-extract\\\\build\\\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\\\Users\\\\ALI\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.13.0\\\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\\\Users\\\\ALI\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.13.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\\\\\Users\\\\\\\\ALI\\\\\\\\AppData\\\\\\\\Local\\\\\\\\node-gyp\\\\\\\\Cache\\\\\\\\16.13.0\\\\\\\\<(target_arch)\\\\\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\\\Users\\\\ALI\\\\Desktop\\\\osamasoliman\\\\node_modules\\\\msgpackr-extract',
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\\\\ALI\\\\Desktop\\\\osamasoliman\\\\node_modules\\\\msgpackr-extract\\\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp: C:\\Users\\ALI\\AppData\\Local\\node-gyp\\Cache\\16.13.0\\common.gypi not found (cwd: C:\\Users\\ALI\\Desktop\\osamasoliman\\node_modules\\msgpackr-extract) 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:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:353:16)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Windows_NT 10.0.19044
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\"
gyp ERR! cwd C:\\Users\\ALI\\Desktop\\osamasoliman\\node_modules\\msgpackr-extract
gyp ERR! node -v v16.13.0
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok"
info This module is OPTIONAL, you can safely ignore this error
PS C:\Users\ALI\Desktop\osamasoliman>
Are you sure that is installed all correctly?
Here it says that he did not found this:
C:\Users\ALI\AppData\Local\node-gyp\Cache\16.13.0\common.gypi not found
See if you can install another packages. If not, try to re-install
I have forked github.com/node-rdkafka and using it to consume node-rdkafka package in my nodejs service.
When I try to install the package, it fails with permission denied error on MacOS. Any ideas on how to fix it? I'm using Node=14.17.6, npm = 6.14.15.
Error log for npm i (same error with yarn):
# This file contains the result of Yarn building a package (node-rdkafka#https://github.com/forkedRepo/node-rdkafka.git#commit=<commitId>)
# Script name: install
gyp info it worked if it ends with ok
gyp info using node-gyp#8.4.1
gyp info using node#14.17.3 | darwin | x64
gyp info find Python using Python version 3.10.6 found at "/usr/local/opt/python#3.10/bin/python3.10"
gyp info spawn /usr/local/opt/python#3.10/bin/python3.10
gyp info spawn args [
gyp info spawn args '/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-rdkafka/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/testfolder/Library/Caches/node-gyp/14.17.3/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/testfolder/Library/Caches/node-gyp/14.17.3',
gyp info spawn args '-Dnode_gyp_dir=/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/testfolder/Library/Caches/node-gyp/14.17.3/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-rdkafka',
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 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
ACTION deps_librdkafka_gyp_librdkafka_target_configure deps/librdkafka/config.h
/bin/sh: ./configure: Permission denied
Command failed: ./configure --prefix=/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-rdkafka/build/deps --libdir=/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-rdkafka/build/deps
make: *** [deps/librdkafka/config.h] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:375:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/testfolder/.nvm/versions/node/v14.17.3/bin/node" "/Users/testfolder/Documents/Repos/repo1/main/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/testfolder/Documents/Repos/repo1/main/node_modules/node-rdkafka
gyp ERR! node -v v14.17.3
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
We have this issue for a couple of days.
nodejs version is12.16.1
we are using yarn and not npm
SHARP_DIST_BASE_URL is referring to https://s3.us-east-2.amazonaws.com/folder
where the libvips-8.7.4-linux-x64.tar.gz is saved
in the config.yml was defined:
working_directory: /home/faul/dev/bot-engine-ci
we didn't change anything on the versions/installations/aws
[5/5] Building fresh packages...
error /home/faul/dev/bot-engine-ci/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /home/faul/dev/bot-engine-ci/node_modules/sharp
Output:
info sharp Downloading ***************************************************libvips-8.7.4-linux-x64.tar.gz
/home/faul/dev/bot-engine-ci/node_modules/sharp/install/libvips.js:86
throw new Error(`Status ${response.statusCode}`);
^
Error: Status 403
at /home/faul/dev/bot-engine-ci/node_modules/sharp/install/libvips.js:86:17
at f (/home/faul/dev/bot-engine-ci/node_modules/once/once.js:25:25)
at ClientRequest.<anonymous> (/home/faul/dev/bot-engine-ci/node_modules/simple-get/index.js:63:5)
at Object.onceWrapper (events.js:418:26)
at ClientRequest.emit (events.js:311:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at TLSSocket.socketOnData (_http_client.js:476:22)
at TLSSocket.emit (events.js:311:20)
at addChunk (_stream_readable.js:294:12)
gyp info it worked if it ends with ok
gyp info using node-gyp#5.0.5
gyp info using node#12.16.1 | linux | x64
gyp info find Python using Python version 2.7.13 found at "/usr/bin/python"
gyp http GET https://nodejs.org/download/release/v12.16.1/node-v12.16.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v12.16.1/node-v12.16.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v12.16.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v12.16.1/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/usr/local/lib/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 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/faul/dev/bot-engine-ci/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/12.16.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/12.16.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/12.16.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/faul/dev/bot-engine-ci/node_modules/sharp',
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 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/faul/dev/bot-engine-ci/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:25:22: fatal error: vips/vips8: No such file or directory
#include <vips/vips8>
^
compilation terminated.
sharp.target.mk:138: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/faul/dev/bot-engine-ci/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.13.0-1023-aws
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/faul/dev/bot-engine-ci/node_modules/sharp
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exited with code exit status 1
CircleCI received exit code 1
All the issues I saw about this were from 2019, I didn't find any new post about that.
Please assist!
Thanks
Solution:
in .circleci/config.yml file
we added under "Install all Dependencies":
environment:
SHARP_DIST_BASE_URL: our CDN link
When I am trying to rebuild my code with the command "electron-rebuild -f -w sqlite3". I am getting this error on windows.
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp#3.7.0
gyp info using node#8.11.3 | win32 | x64
gyp http GET https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp http 200 https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp http GET https://atom.io/download/electron/v2.0.5/SHASUMS256.txt
gyp http GET https://atom.io/download/electron/v2.0.5/win-x64/iojs.lib
gyp http GET https://atom.io/download/electron/v2.0.5/win-x86/iojs.lib
gyp http 200 https://atom.io/download/electron/v2.0.5/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v2.0.5/win-x64/iojs.lib
gyp http 200 https://atom.io/download/electron/v2.0.5/win-x86/iojs.lib
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\company ismi\\AppData\\Roaming\\npm\\node_modules\\electron-rebuild\\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:\\App\\node_modules\\sqlite3\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\company ismi\\AppData\\Roaming\\npm\\node_modules\\electron-rebuild\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\company ismi\\.electron-gyp\\.node- gyp\\iojs-2.0.5\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\company ismi\\.electron- gyp\\.node-gyp\\iojs-2.0.5',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\company ismi\\AppData\\Roaming\\npm\\node_modules\\electron-rebuild\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\company ismi\\.electron- gyp\\.node-gyp\\iojs-2.0.5\\<(target_arch)\\iojs.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\App\\node_modules\\sqlite3',
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:\\App\\node_modules\\sqlite3\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\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.
C:\App\node_modules\sqlite3\build\deps\action_before_build.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\node- gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\company ismi\\AppData\\Roaming\\npm\\node_modules\\electron-rebuild\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.5" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=C:\\App\\node_modules\\sqlite3\\lib\\binding\\electron-v2.0-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.0.2/{toolset}/" "--package_name=electron-v2.0-win32-x64.tar.gz"
gyp ERR! cwd C:\App\node_modules\sqlite3
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Failed with exit code: 1
Error: gyp info it worked if it ends with ok
gyp info using node-gyp#3.7.0
gyp info using node#8.11.3 | win32 | x64
gyp http GET https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp http 200 https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp http GET https://atom.io/download/electron/v2.0.5/SHASUMS256.txt
gyp http GET https://atom.io/download/electron/v2.0.5/win-x64/iojs.lib
gyp http GET https://atom.io/download/electron/v2.0.5/win-x86/iojs.lib
gyp http 200 https://atom.io/download/electron/v2.0.5/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v2.0.5/win-x64/iojs.lib
gyp http 200 https://atom.io/download/electron/v2.0.5/win-x86/iojs.lib
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\company
ismi\\AppData\\Roaming\\npm\\node_modules\\electron-
rebuild\\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:\\App\\node_modules\\sqlite3\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\company ismi\\AppData\\Roaming\\npm\\node_modules\\electron-rebuild\\node_modules\\node- gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\company ismi\\.electron-gyp\\.node- gyp\\iojs-2.0.5\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\company ismi\\.electron- gyp\\.node-gyp\\iojs-2.0.5',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\company ismi\\AppData\\Roaming\\npm\\node_modules\\electron-rebuild\\node_modules\\node- gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\company ismi\\.electron-gyp\\.node-gyp\\iojs-2.0.5\\<(target_arch)\\iojs.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\App\\node_modules\\sqlite3',
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:\\App\\node_modules\\sqlite3\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\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.
C:\App\node_modules\sqlite3\build\deps\action_before_build.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=2.0.5" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=C:\App\node_modules\sqlite3\lib\binding\electron-v2.0-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.0.2/{toolset}/" "--package_name=electron-v2.0-win32-x64.tar.gz"
gyp ERR! cwd C:\App\node_modules\sqlite3
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Failed with exit code: 1
at SafeSubscriber._error (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\spawn-rx\lib\src\index.js:277:84)
at SafeSubscriber.__tryOrUnsub (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:242:16)
at SafeSubscriber.error (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:201:26)
at Subscriber._error (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:132:26)
at Subscriber.error (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:106:18)
at MapSubscriber.Subscriber._error (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:132:26)
at MapSubscriber.Subscriber.error (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:106:18)
at SafeSubscriber._next (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\spawn-rx\lib\src\index.js:251:65)
at SafeSubscriber.__tryOrUnsub (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:242:16)
at SafeSubscriber.next (C:\Users\company ismi\AppData\Roaming\npm\node_modules\electron-rebuild\node_modules\rxjs\Subscriber.js:189:22)
How do i fix that. But The same application is working fine under the Mac System.
Please Guide me to fix this error.
Are you trying to build for both x86 and x64 arch? And please format the question correctly. Looks like node-gyp is using some data from local cache. Have you tried cleaning AppData folder?
What I would do:
Go to the folder where sqlite3 is located e.g. ./node_modules/sqlite3 .
Ensure that for MS Windows you have installed the visual studio compiler and python.
Edit ./node_modules/sqlite3/package.json and add a new entry in the scripts section:
"build_vcust": "node-pre-gyp rebuild --target=X.X.X --arch=x64 --dist-url=https://atom.io/download/electron --msvs_version=2015"
Note: Replace X.X.X with your electron version.
From the sqlite3 folder execute "npm run build_vcust".
Learn more at (reference): https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md
Good day for everyone!
My OS: WINDOWS 8
Installed software: VS2012 expess, Python 2.7.5, Windows8SDK, node 0.10.17, npm 1.3.8
I got error:
C:\Users\sapa\worksapce\node-sqlite3\build\Release\obj\global_intermediate\sqlite-autoconf-3071700\sqlite3.c(606):
fatal error C1083: Cannot open include file: 'stdarg.h': No such file
or directory
[C:\Users\sapa\worksapce\node-sqlite3\build\deps\sqlite3.vcxproj]
when I installed module node-sqlite3 on my OS.
For installing I used command npm install node-sqlite3 and got this error. After that I used installing from source:
I cloned source from github https://github.com/developmentseed/node-sqlite3
then I used command node-gyp configure and got
C:\Users\sapa\worksapce\node-sqlite3>node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp#0.10.9
gyp info using node#0.10.17 | win32 | x64
gyp http GET http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
gyp http GET http://nodejs.org/dist/v0.10.17/node.lib
gyp http GET http://nodejs.org/dist/v0.10.17/x64/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.17/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.17/x64/node.lib
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\sapa\\AppData\\Roaming\\npm\\node_modules\\nod
e-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 'C:\\Users\\sapa\\worksapce\\node-sqlite3\\build\\config.g
ypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\sapa\\AppData\\Roaming\\npm\\node_modules\\nod
e-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\sapa\\.node-gyp\\0.10.17\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\sapa\\.node-gyp\\0.10.17',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\sapa\\worksapce\\node-sqlite
3',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\sapa\\worksapce\\node-sqlite3\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
then node-gyp build and got:
C:\Users\sapa\worksapce\node-sqlite3>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp#0.10.9
gyp info using node#0.10.17 | win32 | x64
gyp info spawn msbuild
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.
unpack_sqlite_dep
sqlite3.c
C:\Users\sapa\worksapce\node-sqlite3\build\Release\obj\global_intermediate\sqli
te-autoconf-3071700\sqlite3.c(606): fatal error C1083: Cannot open include file
: 'stdarg.h': No such file or directory [C:\Users\sapa\worksapce\node-sqlite3\b
uild\deps\sqlite3.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\sapa\AppData\Roaming\npm\nod
e_modules\node-gyp\lib\build.js:267:23)
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.2.9200
gyp ERR! command "node" "C:\\Users\\sapa\\AppData\\Roaming\\npm\\node_modules\\n
ode-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\sapa\worksapce\node-sqlite3
gyp ERR! node -v v0.10.17
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
Cloud you help me in this problem?
It seems like you are trying to build a 64 bit installation (Platform=x64).
A 32 bit node v0.10.22 with npm install sqlite3 works for me on windows 7
set like this, and then have a try:
npm config set msvs_version 2012
npm config set python c:/python/python.exe