Circleci failed downloading libvips - node.js

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

Related

node-rdkafka installation failing with Permission Denied error

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

Need to solve yarn install error: fatal error: 'napi.h' file not found

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.

Cant rebuild My electron App After Installing sqlite3 module

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

Node ldap-client installation error

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

Can't rebuild node-opencv with nw-gyp

I'm trying to rebuild node-opencv for use with node-webkit. To do this you need to use nw-gyp but I'm running into some errors. Could you give me any insight into why this might be?
[~/nw_cv/node_modules/opencv] nw-gyp rebuild --target=0.9.2
gyp info it worked if it ends with ok
gyp info using nw-gyp#0.12.2
gyp info using node#0.10.26 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/nw-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/moog/nw_cv/node_modules/opencv/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/moog/.nw-gyp/0.9.2/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/moog/.nw-gyp/0.9.2',
gyp info spawn args '-Dmodule_root_dir=/Users/moog/nw_cv/node_modules/opencv',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/opencv/src/init.o
In file included from ../src/init.cc:2:
../src/Point.h:13:59: error: unknown type name 'AccessorInfo'
static Handle<Value> GetX(Local<String> prop, const AccessorInfo &info);
^
../src/Point.h:14:59: error: unknown type name 'AccessorInfo'
static Handle<Value> GetY(Local<String> prop, const AccessorInfo &info);
^
../src/Point.h:15:84: error: unknown type name 'AccessorInfo'
static void RaiseImmutable(Local<String> property, Local<Value> value, const AccessorInfo& info);
^
3 errors generated.
make: *** [Release/obj.target/opencv/src/init.o] Error 1
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/nw-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:797:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/bin/nw-gyp" "rebuild" "--target=0.9.2"
gyp ERR! cwd /Users/moog/nw_cv/node_modules/opencv
gyp ERR! node -v v0.10.26
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok
Thanks!
As you can see compiler can't find type AccessorInfo. That's because there is no more such class in v8 API. node-webkit v0.9.2 is based on node 0.11.x branch, so some native addons might not compile or work correctly because of v8 API changes. You need to use node-webkit 0.8.x branch is these cases.

Resources