nodeshift / nodejs-reference-architecture

The Red Hat and IBM Node.js Reference architecture. The teams 'opinion' on what components our customers and internal teams should use when building Node.js applications and guidance for how to be successful in production with those components.
https://nodeshift.dev/nodejs-reference-architecture/
Apache License 2.0
1.66k stars 120 forks source link

Build style job is failing with error #94

Closed wtrocki closed 2 years ago

wtrocki commented 2 years ago

Checking if module is tested by community CITGM runs WARN TypeError: Cannot read property 'cves' of undefined at /home/runner/.npm/_npx/2123/lib/node_modules/npcheck/src/plugins/audit.js:60:49 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Promise.all (index 0) at async auditPlugin (/home/runner/.npm/_npx/2123/lib/node_modules/npcheck/src/plugins/audit.js:69:28) at async Object.run (/home/runner/.npm/_npx/2123/lib/node_modules/npcheck/src/cli.js:101:24) Error: Process completed with exit code 1.

aalykiot commented 2 years ago

@wtrocki which npcheck.json file causes this error ??

wtrocki commented 2 years ago

https://github.com/nodeshift/nodejs-reference-architecture/blob/main/npcheck.json

aalykiot commented 2 years ago

@wtrocki I'm trying to reproduce the problem but I can't even install the odbc package (using node 14.x and 15.x) with NPM:

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/markdirish/node-odbc/releases/download/v2.4.1/odbc-v2.4.1-darwin-x64-napi-v6.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for odbc@2.4.1 and node@14.16.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/markdirish/node-odbc/releases/download/v2.4.1/odbc-v2.4.1-darwin-x64-napi-v6.tar.gz
  CXX(target) Release/obj.target/odbc/src/odbc.o
In file included from ../src/odbc.cpp:22:
../src/odbc.h:32:10: fatal error: 'sql.h' file not found
#include <sql.h>
         ^~~~~~~
1 error generated.
make: *** [Release/obj.target/odbc/src/odbc.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/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/alex/Workspace/repos/redhat/node_modules/odbc/lib/bindings/napi-v6/odbc.node" "--module_name=odbc" "--module_path=/Users/alex/Workspace/repos/redhat/node_modules/odbc/lib/bindings/napi-v6" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd /Users/alex/Workspace/repos/redhat/node_modules/odbc
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/alex/Workspace/repos/redhat/node_modules/odbc/lib/bindings/napi-v6/odbc.node --module_name=odbc --module_path=/Users/alex/Workspace/repos/redhat/node_modules/odbc/lib/bindings/napi-v6 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/alex/Workspace/repos/redhat/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/alex/Workspace/repos/redhat/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/alex/Workspace/repos/redhat/node_modules/odbc
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.6
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/alex/Workspace/repos/redhat/node_modules/odbc/lib/bindings/napi-v6/odbc.node --module_name=odbc --module_path=/Users/alex/Workspace/repos/redhat/node_modules/odbc/lib/bindings/napi-v6 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm WARN redhat@1.0.0 No description
npm WARN redhat@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! odbc@2.4.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the odbc@2.4.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alex/.npm/_logs/2021-10-27T12_53_26_397Z-debug.log

My guess is that currently, something's going wrong with the odbc package.

richardlau commented 2 years ago

My guess is that currently, something's going wrong with the odbc package.

That package has pre-requisites to build (e.g. on RHEL/CentOS, sudo yum install unixODBC unixODBC-devel)