question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node 16 build error

See original GitHub issue
> yarn add fido2-lib
yarn add v1.22.10
[1/4] 🔍  Resolving packages...
warning fido2-lib > node-jose > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > next@11.0.1" has incorrect peer dependency "react@^17.0.2".
warning " > next@11.0.1" has incorrect peer dependency "react-dom@^17.0.2".
warning "@types/next > next > @next/react-dev-overlay@11.0.1" has incorrect peer dependency "react@^17.0.2".
warning "@types/next > next > @next/react-dev-overlay@11.0.1" has incorrect peer dependency "react-dom@^17.0.2".
warning "@types/next > next > styled-jsx@3.3.2" has incorrect peer dependency "react@15.x.x || 16.x.x || 17.x.x".
warning "@types/next > next > use-subscription@1.5.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning " > next-mdx-remote@3.0.2" has incorrect peer dependency "react@>=16.x <=17.x".
warning " > next-mdx-remote@3.0.2" has incorrect peer dependency "react-dom@>=16.x <=17.x".
warning "next-mdx-remote > @mdx-js/react@1.6.22" has incorrect peer dependency "react@^16.13.1 || ^17.0.0".
warning " > next-seo@4.24.0" has incorrect peer dependency "next@^8.1.1-canary.54 || ^9.0.0 || ^10.0.0".
warning " > next-seo@4.24.0" has incorrect peer dependency "react@^16.0.0 || ^17.0.0".
warning " > next-seo@4.24.0" has incorrect peer dependency "react-dom@^16.0.0 || ^17.0.0".
warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] 🔨  Building fresh packages...
[-/3] ⠄ waiting...
[-/3] ⠄ waiting...
error /Users/himself65/Code/Github/himself65.github.io/node_modules/node-webcrypto-ossl: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /Users/himself65/Code/Github/himself65.github.io/node_modules/node-webcrypto-ossl
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.4.0 | darwin | x64
gyp info find Python using Python version 3.9.5 found at "/usr/local/opt/python@3.9/bin/python3.9"
(node:12667) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
gyp info spawn args [
gyp info spawn args   '/Users/himself65/.nvm/versions/node/v16.4.0/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   '/Users/himself65/Code/Github/himself65.github.io/node_modules/node-webcrypto-ossl/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/himself65/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/himself65/Library/Caches/node-gyp/16.4.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/himself65/Library/Caches/node-gyp/16.4.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/himself65/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/himself65/Library/Caches/node-gyp/16.4.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/himself65/Code/Github/himself65.github.io/node_modules/node-webcrypto-ossl',
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' ]
  CXX(target) Release/obj.target/nodessl/src/main.o
Apple clang version 13.0.0 (clang-1300.0.18.6)
Target: x86_64-apple-darwin21.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.7.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -faligned-alloc-unavailable -target-sdk-version=12.0 -fvisibility-inlines-hidden-static-local-var -target-cpu core2 -tune-cpu generic -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=lldb -target-linker-version 705 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0 -dependency-file ./Release/.deps/Release/obj.target/nodessl/src/main.o.d.raw -skip-unused-modulemap-deps -MT Release/obj.target/nodessl/src/main.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -D NODE_GYP_MODULE_NAME=nodessl -D USING_UV_SHARED=1 -D USING_V8_SHARED=1 -D V8_DEPRECATION_WARNINGS=1 -D V8_DEPRECATION_WARNINGS -D V8_IMMINENT_DEPRECATION_WARNINGS -D _GLIBCXX_USE_CXX11_ABI=1 -D _DARWIN_USE_64_BIT_INODE=1 -D _LARGEFILE_SOURCE -D _FILE_OFFSET_BITS=64 -D OPENSSL_NO_PINSHARED -D OPENSSL_THREADS -D BUILDING_NODE_EXTENSION -I /Users/himself65/Library/Caches/node-gyp/16.4.0/include/node -I /Users/himself65/Library/Caches/node-gyp/16.4.0/src -I /Users/himself65/Library/Caches/node-gyp/16.4.0/deps/openssl/config -I /Users/himself65/Library/Caches/node-gyp/16.4.0/deps/openssl/openssl/include -I /Users/himself65/Library/Caches/node-gyp/16.4.0/deps/uv/include -I /Users/himself65/Library/Caches/node-gyp/16.4.0/deps/zlib -I /Users/himself65/Library/Caches/node-gyp/16.4.0/deps/v8/include -I ../../nan -I/usr/local/include -stdlib=libc++ -stdlib=libc++ -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -O3 -Wall -Wendif-labels -W -Wno-unused-parameter -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/himself65/Code/Github/himself65.github.io/node_modules/node-webcrypto-ossl/build -ferror-limit 19 -stack-protector 1 -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fno-rtti -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -vectorize-loops -vectorize-slp -clang-vendor-feature=+nullptrToBoolConversion -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNeonImmediateRangeCheck -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+revert09abecef7bbf -mllvm -disable-aligned-alloc-awareness=1 -mllvm -enable-dse-memoryssa=0 -o Release/obj.target/nodessl/src/main.o -x c++ ../src/main.cpp
clang -cc1 version 13.0.0 (clang-1300.0.18.6) default target x86_64-apple-darwin21.0.0
ignoring nonexistent directory "/Users/himself65/Library/Caches/node-gyp/16.4.0/src"
ignoring nonexistent directory "/Users/himself65/Library/Caches/node-gyp/16.4.0/deps/openssl/config"
ignoring nonexistent directory "/Users/himself65/Library/Caches/node-gyp/16.4.0/deps/openssl/openssl/include"
ignoring nonexistent directory "/Users/himself65/Library/Caches/node-gyp/16.4.0/deps/uv/include"
ignoring nonexistent directory "/Users/himself65/Library/Caches/node-gyp/16.4.0/deps/zlib"
ignoring nonexistent directory "/Users/himself65/Library/Caches/node-gyp/16.4.0/deps/v8/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Users/himself65/Library/Caches/node-gyp/16.4.0/include/node
 ../../nan
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
In file included from ../src/main.cpp:1:
In file included from ../src/node/common.h:4:
In file included from ../src/node/../core/common.h:8:
In file included from ../../nan/nan.h:56:
In file included from /Users/himself65/Library/Caches/node-gyp/16.4.0/include/node/node.h:63:
In file included from /Users/himself65/Library/Caches/node-gyp/16.4.0/include/node/v8.h:30:
/Users/himself65/Library/Caches/node-gyp/16.4.0/include/node/v8-internal.h:454:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
            !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                ~~~~~^~~~~~~~~~~
                                     remove_cv
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
1 error generated.
make: *** [Release/obj.target/nodessl/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/himself65/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 21.0.0
gyp ERR! command "/Users/himself65/.nvm/versions/node/v16.4.0/bin/node" "/Users/himself65/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/himself65/Code/Github/himself65.github.io/node_modules/node-webcrypto-ossl
gyp ERR! node -v v16.4.0
gyp ERR! node-gyp -v v7.1.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesCullumcommented, Jul 8, 2021

Major version was still on 1 - changed it to v2, now it works

1reaction
JamesCullumcommented, Jul 8, 2021

Thanks for the extension of the test coverage - now we see the errors. Upgrading didn’t fix it, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to install node-gyp with node 14/16 #2458 - GitHub
Not able to install node-gyp, if I am downgrading node to 12 it's working. Update 1 - on (22/07/21). context - Currently using...
Read more >
NPM install not working for Node V 16.0.0 - Stack Overflow
I am having trouble finding a solution to this. I am trying npm install for a project but I get a very large...
Read more >
Errors | Node.js v19.3.0 Documentation
System errors triggered by underlying operating system constraints such as attempting to open a file that does not exist or attempting to send...
Read more >
Debugging "Make Failed with Exit Code 2" Error - CodeForGeek
The “Make Failed with Exit Code 2” error occurs during the node modules installation. We see lots of stack trace including the one...
Read more >
Solving common issues with node-gyp - LogRocket Blog
Many node-gyp issues are actually issues with the toolchain used for building add-on code. We'll categorize these issues to offer solutions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found