I have a node.js project in which i am using node-sqlite3 to read write the sqlite3 database.
I am using devtool to generate the recipe for node.js.
After generating the recipe when i try "bitbake node-project".
sqlite3 gives an error of node-gyp and node-pre-gyp.
ERROR: node-sqlite3-3.1.13+g.....
gyp info it worked if it ends with ok
gyp info using node-gyp#6.1.0
gyp info using node#12.14.1 | linux | x64
gyp info find Python using Python version 3.6.9 found at "/home/user/build/tmp-glibc/hosttools/python3"
gyp http GET https://nodejs.org/download/release/v12.14.1/node-v12.14.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v12.14.1/node-v12.14.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v12.14.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v12.14.1/SHASUMS256.txt
gyp info spawn /home/user/build/tmp-glibc/hosttools/python3
gyp info spawn args [
gyp info spawn args '/home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/recipe-sysroot-native/usr/lib/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/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/git/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/recipe-sysroot-native/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/tmp/tmpdbkdzu8w/.cache/node-gyp/12.14.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=/tmp/tmpdbkdzu8w/.cache/node-gyp/12.14.1',
gyp info spawn args '-Dnode_gyp_dir=/home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/recipe-sysroot-native/usr/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/tmp/tmpdbkdzu8w/.cache/node-gyp/12.14.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/git',
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: Undefined variable module_name in 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 (/home/user/yocto_mapro/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/recipe-sysroot-native/usr/lib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.4.0-58-generic
gyp ERR! command "/home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/recipe-sysroot-native/usr/bin/node" "/home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/recipe-sysroot-native/usr/bin/node-gyp" "--arch" "arm" "configure"
gyp ERR! cwd /home/user/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/node-sqlite3/3.1.13+gitAUTOINC+72bddafddc-r0/git
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
WARNING: exit code 1 from a shell command.
I dont know how can i fix this. can somebody please help?
You have just need to follow the steps to install sqlite3 in Yocto.
You have to first check if gcc is available or not with this given command
gcc --version
If not available than install it with given command
bitbake meta-toolchain
After that remove node_modules by
rm -rf node_modules
Install npm globally
Remove package-lock.json file
Now install sqlite3 from source with this command
npm install --build-from-source --sqlite=/usr/local/opt/sqlite/
this will allow you to use sqlite3 on Yocto.
Reference Link : https://www.npmjs.com/package/sqlite3
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
I upgraded node version 12 to 14.20.0, and Angular CLI 9 to 14.0.7
I use MacOS Monterey 12.5, M1 chip
When I run the command yarn clean:npm && yarn install, I got this error.
I tried yarn add command for not found node-modules, and nothing changed.
$yarn install
Error
warning Error running install script for optional dependency: "/Users/myName/projects/popopo/projectName/frontend/node_modules/nice-napi: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /Users/myName/projects/popopo/projectName/frontend/node_modules/nice-napi
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#8.1.0
gyp info using node#14.20.0 | darwin | arm64
gyp info find Python using Python version 3.10.4 found at \"/Users/myName/.anyenv/envs/pyenv/versions/3.10.4/bin/python3\"
gyp info spawn /Users/myName/.anyenv/envs/pyenv/versions/3.10.4/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/myName/projects/popopo/projectName/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/myName/projects/popopo/projectName/frontend/node_modules/nice-napi/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myName/projects/popopo/projectName/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myName/Library/Caches/node-gyp/14.20.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=/Users/myName/Library/Caches/node-gyp/14.20.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/myName/projects/popopo/projectName/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/myName/Library/Caches/node-gyp/14.20.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/myName/projects/popopo/projectName/frontend/node_modules/nice-napi',
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' ]
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
LIBTOOL-STATIC Release/nothing.a
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)
CXX(target) Release/obj.target/nice_napi/binding.o
/bin/sh: pathos/projectName/frontend/node_modules/node-addon-api: No such file or directory
make: *** [Release/obj.target/nice_napi/binding.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/myName/projects/popopo/projectName/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command \"/Users/myName/.anyenv/envs/nodenv/versions/14.20.0/bin/node\" \"/Users/myName/projects/popopo/projectName/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/myName/projects/popopo/projectName/frontend/node_modules/nice-napi
gyp ERR! node -v v14.20.0
gyp ERR! node-gyp -v v8.1.0
gyp ERR! not ok
../binding.cc:1:10: fatal error: 'napi.h' file not found
✨ Done in 127.04s.
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