Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idbconnector dependency #10

Closed
GitNomster opened this issue Feb 22, 2019 · 7 comments
Closed

idbconnector dependency #10

GitNomster opened this issue Feb 22, 2019 · 7 comments

Comments

@GitNomster
Copy link

When i install default-gateway 3.1.0 console warns about:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\idb-connector):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"aix","arch":"any"} (current: {"os":"win32","arch":"x64"})

and then, when i try to install deps with npm ci it starts to install idb-connector. And result is:

> [email protected] install C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\lib\binding\Release\node-v64-ibmi-x64\db2ia.node" (not found)
node-pre-gyp http GET https://github.com/IBM/nodejs-idb-connector/releases/download/1.1.8/db2ia-v1.1.8-node-v64-ibmi-x64.tar.gz
node-pre-gyp http 404 https://github.com/IBM/nodejs-idb-connector/releases/download/1.1.8/db2ia-v1.1.8-node-v64-ibmi-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/IBM/nodejs-idb-connector/releases/download/1.1.8/db2ia-v1.1.8-node-v64-ibmi-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/IBM/nodejs-idb-connector/releases/download/1.1.8/db2ia-v1.1.8-node-v64-ibmi-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Users\\user\\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=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\Desktop\\aa\\electron-quick-start\\node_modules\\idb-connector\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\.node-gyp\\10.15.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=C:\\Users\\user\\.node-gyp\\10.15.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\user\\.node-gyp\\10.15.1\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\user\\Desktop\\aa\\electron-quick-start\\node_modules\\idb-connector',
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\\user\\Desktop\\aa\\electron-quick-start\\node_modules\\idb-connector\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.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' ]
  db2ia.cc
  dbconn.cc
  dbstmt.cc
  win_delay_load_hook.cc
c:\users\user\desktop\aa\electron-quick-start\node_modules\idb-connector\src\db2ia\dbconn.h(13): fatal error C1083: Cannot open include file: 'sqlcli.h': No such file or directory (compiling source file ..\src
\db2ia\db2ia.cc) [C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\build\db2ia.vcxproj]
c:\users\user\desktop\aa\electron-quick-start\node_modules\idb-connector\src\db2ia\dbconn.h(13): fatal error C1083: Cannot open include file: 'sqlcli.h': No such file or directory (compiling source file ..\src
\db2ia\dbconn.cc) [C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\build\db2ia.vcxproj]
c:\users\user\desktop\aa\electron-quick-start\node_modules\idb-connector\src\db2ia\dbconn.h(13): fatal error C1083: Cannot open include file: 'sqlcli.h': No such file or directory (compiling source file ..\src
\db2ia\dbstmt.cc) [C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\build\db2ia.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\user\\Desktop\\aa\\electron-quick-start\\node_modules\\idb-connector\\lib\\binding\\Release\\node-v64-ibmi-x64\\db2ia.node" "--module_name=db2ia" "--module_path=C:\\Users\\user\\Desktop\\aa\\electron-quick-start\\node_modules\\idb-connector\\lib\\binding\\Release\\node-v64-ibmi-x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.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\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\lib\binding\Release\node-v64-ibmi-x64\db2ia.node --module_name=db2ia --module_path=C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\lib\binding\Release\node-v64-ibmi-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\Desktop\\aa\\electron-quick-start\\node_modules\\idb-connector\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\lib\binding\Release\node-v64-ibmi-x64\db2ia.node --module_name=db2ia --module_path=C:\Users\user\Desktop\aa\electron-quick-start\node_modules\idb-connector\lib\binding\Release\node-v64-ibmi-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)

With default-gateway v3.0.1 all is ok.

@silverwind
Copy link
Owner

silverwind commented Feb 22, 2019

idb-connector is a AIX only dependency. Seems like two distinct bugs in npm ci to me:

  • It seems to ignore the os field of the package.
  • It fails a build on a optionalDependency. Edit: Exit Code is 0 so it does not appear to fail it.

@silverwind
Copy link
Owner

https://npm.community/t/npm-ci-ignores-the-os-field-of-package-json/5607

@GitNomster
Copy link
Author

awesome, thank you.

@silverwind
Copy link
Owner

silverwind commented Feb 22, 2019

I'm considering dropping AIX support (until a JS-only solution is found) again if npm ci has any widespread use, this is quite unacceptable.

cc: @patrickhrastnik

@silverwind silverwind reopened this Feb 22, 2019
silverwind added a commit that referenced this issue Feb 22, 2019
`npm ci` and `npm install --force` have a bug where it attempts to install
the AIX-specific dependency even on non-AIX platforms, which results in a
huge block of gyp errors on all other platforms.

This commit removes AIX and the native dependency again, eliminating
these type of errors.
@silverwind
Copy link
Owner

Really sorry, but I had to remove AIX support again, I can't accept breaking builds on other platforms for something that maybe a handful of people are going to use. Happy to take a PR that does the same but with JS only.

@ThePrez
Copy link
Contributor

ThePrez commented Feb 22, 2019

Related to this idb-connector issue:
IBM/nodejs-idb-connector#54

The problem is that the idb-connector package only builds on the IBM i platform's variant of AIX. There's not a good way to condition the build for only IBM i and not all AIXes

@silverwind
Copy link
Owner

sindresorhus/internal-ip#25 is pending to propagate this fix upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants