profile
viewpoint

Ask questionsFails on every npm install on macOS Mojave

<!-- Thank you for reporting an issue. The more information you can give us, the better the chance we can fix your problem.

This issue tracker is for issues with node-gyp, if you have an issue installing a specific module, please file an issue on that module's issue tracker (npm issues modulename). -->

  • Node Version: v12.1.0
  • npm Version: 6.9.0
  • Platform: MacOS Mojave 10.14.4
  • Compiler: Xcode
  • node-gyp: v4.0.0

<details><summary>Errors from 'ng new example':</summary>

  c++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/scott/.node-gyp/12.1.0/include/node -I/Users/scott/.node-gyp/12.1.0/src -I/Users/scott/.node-gyp/12.1.0/deps/openssl/config -I/Users/scott/.node-gyp/12.1.0/deps/openssl/openssl/include -I/Users/scott/.node-gyp/12.1.0/deps/uv/include -I/Users/scott/.node-gyp/12.1.0/deps/zlib -I/Users/scott/.node-gyp/12.1.0/deps/v8/include -I../../nan -I../src/libsass/include  -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/binding/src/create_string.o.d.raw   -c -o Release/obj.target/binding/src/create_string.o ../src/create_string.cpp
../src/create_string.cpp:17:25: error: no matching constructor for initialization of 'v8::String::Utf8Value'
  v8::String::Utf8Value string(value);
                        ^      ~~~~~
/Users/scott/.node-gyp/12.1.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::Value>' to
      'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/Users/scott/.node-gyp/12.1.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
1 error generated.
make: *** [Release/obj.target/binding/src/create_string.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/scott/ed/example/node_modules/node-sass/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 Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/Users/scott/ed/example/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/scott/ed/example/node_modules/node-sass
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1

</details>

<!-- Any further details --> That happens every time I try to npm install something. I removed ~/.node_gyp and then installed globally without effect.

% xcodebuild -version
Xcode 10.2.1
Build version 10E1001

This happens from just doing ng new example so I don't believe it's an issue with any other module

nodejs/node-gyp

Answer questions grosch

Upgrading angular cli (npm install -g @angular/cli) fixed this.

useful!

Related questions

Error: `gyp` failed with exit code: 1 at ChildProcess.onCpExit hot 4
gyp ERR! stack Error: `make` failed with exit code: 2 hot 2
npm install error on windows 10 hot 2
node-gyp: EPERM: operation not permitted, read hot 2
Visual Studio finder is doing a case-sensitive path check hot 2
node-gyp rebuild failed hot 1
Node gyp build fails on node v12.1.0 hot 1
node-pre-gyp build fail error while installing with `npm install` or `npm install -d` hot 1
Is this an Issue with MACOS catalina? hot 1
gyp ERR! stack Error: `make` failed with exit code: 2 hot 1
Is this an Issue with MACOS catalina? hot 1
Is this an Issue with MACOS catalina? hot 1
Not able to build in osx 10.14.2 with java 10.0.1 hot 1
TypeError: '>=' not supported between instances of 'tuple' and 'str' hot 1
Breaks with VS2019 installed hot 1
source:https://uonfu.com/
Github User Rank List