Axosoft / nsfw

A super fast and scaleable file watcher that provides a consistent interface on Linux, OSX and Windows
MIT License
901 stars 113 forks source link

build error 'CoreServices/CoreServices.h' file not found #141

Open max91 opened 3 years ago

max91 commented 3 years ago

Hello, I am trying to install this package from npm and faced the following problem:

> nsfw@2.1.2 install /Users/maksimkozlov/apt/my-ide/node_modules/nsfw
> node-gyp rebuild

(node:43666) [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)
  CXX(target) Release/obj.target/nsfw/src/NSFW.o
In file included from ../src/NSFW.cpp:1:
In file included from ../src/../includes/NSFW.h:12:
In file included from ../includes/./NativeInterface.h:8:
In file included from ../includes/../includes/osx/FSEventsService.h:4:
../includes/../includes/osx/RunLoop.h:7:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../includes/../includes/osx/RunLoop.h:7:10: note: did not find header 'CoreServices.h' in framework 'CoreServices' (loaded from '/System/Library/Frameworks')
1 error generated.
make: *** [Release/obj.target/nsfw/src/NSFW.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/npm-lifecycle/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 20.2.0
gyp ERR! command "/usr/local/lib/node_modules/node/lib/node_modules/node/lib/node_modules/node/lib/node_modules/node/bin/node" "/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/maksimkozlov/apt/my-ide/node_modules/nsfw
gyp ERR! node -v v16.3.0
gyp ERR! node-gyp -v v8.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nsfw@2.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nsfw@2.1.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Google didn't help me with stackoverflow either. You are my last hope =) Plz help

implausible commented 3 years ago

Version of OSX and version of XCode installed?

max91 commented 3 years ago

MacOs 11.1 xcode not installed, but i have command line tools with Apple clang version 12.0.5 (clang-1205.0.22.9)

implausible commented 3 years ago

https://github.com/nodejs/node-gyp#on-macos Try following this guide and rebuilding.

max91 commented 3 years ago

used the link above. reinstalled everything three times. nothing helped =(