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

Bug: Missing yarn-error.json on build failure #7254

Closed
ericvicenti opened this issue May 7, 2019 · 3 comments
Closed

Bug: Missing yarn-error.json on build failure #7254

ericvicenti opened this issue May 7, 2019 · 3 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@ericvicenti
Copy link
Contributor

ericvicenti commented May 7, 2019

I have a build error in one of my packages (sqlite3) after upgrading to node 12. Yarn is doing a bad job of reporting this error. There is no yarn-error.json being produced

I need to know what version of sqlite3 is being installed, and who is depending on it. The log/error output is not helpful for this, and there is no new error report file.

Node Version: v12.1.0
Yarn Version: v1.12.3
Seen on latest macOS and Ubuntu 18.04

Error output is below, with irrelevant stuff clipped:

user@server:~/project$ yarn
yarn install v1.12.3
warnings <clipped>
[1/4] Resolving packages...
[2/4] Fetching packages...
info <clipped>
[3/4] Linking dependencies...
warnings <clipped>
[4/4] Building fresh packages...
[-/3] ⠄ waiting...
[2/3] ⡀ sqlite3
error /var/lib/buildkite-agent/ono/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /var/lib/buildkite-agent/ono/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@12.1.0 | linux | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v72-linux-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v72-linux-x64.tar.gz
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v72-linux-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.6 and node@12.1.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v72-linux-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.1.0 | linux | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.1.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args   '/usr/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   '/var/lib/buildkite-agent/ono/node_modules/sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/lib/buildkite-agent/.node-gyp/12.1.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=/var/lib/buildkite-agent/.node-gyp/12.1.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/var/lib/buildkite-agent/.node-gyp/12.1.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/var/lib/buildkite-agent/ono/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   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.1.0 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/var/lib/buildkite-agent/ono/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3260000/sqlite3.o
Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c: In function ‘sqlite3_db_status’:
Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c:20744:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
       op = SQLITE_DBSTATUS_CACHE_WRITE+1;
       ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c:20746:5: note: here
     case SQLITE_DBSTATUS_CACHE_HIT:
     ^~~~
<more native build errors clipped>
Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback((context), (callback), (argc), (argv))
                                                            ^
../src/database.cc:672:9: note: in expansion of macro ‘TRY_CATCH_CALL’
         TRY_CATCH_CALL(db->handle(), cb, 1, argv);
         ^~~~~~~~~~~~~~
In file included from ../src/database.h:10:0,
                 from ../src/database.cc:4:
../node_modules/nan/nan.h:929:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
node_sqlite3.target.mk:127: recipe for target 'Release/obj.target/node_sqlite3/src/database.o' failed
make: Leaving directory '/var/lib/buildkite-agent/ono/node_modules/sqlite3/build'
make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Linux 4.15.0-1029-gcp
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /var/lib/buildkite-agent/ono/node_modules/sqlite3
gyp ERR! node -v v12.1.0
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 '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/lib/buildkite-agent/ono/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1000:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
node-pre-gyp ERR! System Linux 4.15.0-1029-gcp
node-pre-gyp ERR! command "/usr/bin/node" "/var/lib/buildkite-agent/ono/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/lib/buildkite-agent/ono/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/lib/buildkite-agent/ono/node_modules/sqlite3/lib/binding/node-v72-linux-x64 --napi_version=4 --node_abi_n

Again, there is no yarn-error file being produced, and I need to see what version of sqlite3 is being used, and by who!

PS: the affiliated sqlite3 issue is here: TryGhost/node-sqlite3#1151

@3luyka
Copy link

3luyka commented May 8, 2019

same :/

@DanielRuf
Copy link
Contributor

It can happen that node-gyp exits the process early due to errors. So far sqlite3 may not support NodeJS 12.

@paul-soporan
Copy link
Member

Closing as v2 does a much better job at reporting build errors.

https://yarnpkg.com/getting-started/migration

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

4 participants