Node: An error during installation on MacOS

Created on 16 May 2018  路  11Comments  路  Source: nodejs/node

Not sure whether I've chosen the right topic but this error appears if I install any package.

Node version v10.1.0
npm version 6.0.1

Sergeys-MacBook-Air:portfolio sergeygultyayev$ npm i firebase@latest

> [email protected] install /Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents
> node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
         ~~~  ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:834:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:849:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator

In file included from ../fsevents.cc:6:
../../nan/nan.h:864:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return scope.Escape(node::MakeCallback(
                              ^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/sergeygultyayev/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
4 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.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:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/10.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.1.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:957:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.1.0/bin/node" "/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents
node-pre-gyp ERR! node -v v10.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node/10.1.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/sergeygultyayev/Projects/portfolio/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
updated 16 packages in 59.177s
[!] 85 vulnerabilities found [24751 packages audited]
    Severity: 35 Low | 32 Moderate | 18 High
    Run `npm audit` for more detail
invalid

Most helpful comment

It's been over a year, but just in case anyone faces this problem again.

on my Mac OS, I removed the yarn.lock file and tried 'yarn install' again

All 11 comments

On the face of it looks like it is a gcc compiler version mismatch. From the message:
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)

looks like the module owners anticipated such issues for users, created pre-built binaries that do not depend on the compiler version (but on runtime libraries that are relatively compatible across a wider range) - but looks like they haven't yet prepare such a pre-built binary for Node.js version v10.1.0

  • You could experiment with lower versions of Node (for example the latest LTS) and see if it succeeds.
  • On the other hand using v10.1.0 is important, you may raise it with the module owners to pre-package their library against that version.

  • Alternatively you could check their web site for the compiler requirements, and upgrade yours.

Options are ordered in the increasing level of effort. :)

I was updating from 10.0.0 with the same error. Was thinking that update may fix the situation but not happened

Not sure if there is a need to have the latest version while having nodejs just to run Angular/ReactJS/WebPack/Gulp

IMHO the problem is similar to this, see

In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
         ~~~  ^

@gultyaev As a workaround you could always downgrade to node@9

Closing, this has nothing to do with node.js itself and everything with the module you're trying to install/build - which isn't the latest version so upgrade it.

You are likely facing an issue fixed by https://github.com/strongloop/fsevents/commit/10ab073626851cc0925f82f0d5ffb5dfeca494ca , updating fsevents or nan on your dependency chain one way or another may fix the compilation error with Node 10.

It's been over a year, but just in case anyone faces this problem again.

on my Mac OS, I removed the yarn.lock file and tried 'yarn install' again

From: https://github.com/yarnpkg/yarn/issues/5962#issuecomment-491934806

This is what worked for me:

// package.json
{
  "resolutions": {
    "**/**/fsevents": "^1.2.9"
  }
}

@Princemo4 where is the yarn.lock file? I don't see on my system.

Still facing this issue. Deleted the package-lock.json too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akdor1154 picture akdor1154  路  3Comments

ksushilmaurya picture ksushilmaurya  路  3Comments

dfahlander picture dfahlander  路  3Comments

willnwhite picture willnwhite  路  3Comments

srl295 picture srl295  路  3Comments