tjmehta / atom-term

shell tab for atom
MIT License
57 stars 15 forks source link

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

Open tedivm opened 9 years ago

tedivm commented 9 years ago

I have the xcode command line tools installed, but not the full blown xcode ide itself. It seems that this is a dependency for this application, so I get a nasty error when I attempt things.

I have no problem with xcode being a requirement, but you may want to make the error message something a little more straight forward to make it easier for people to figure out.

Roberts-MacBook-Pro-2:Provisioning rhafner$ apm install term
Installing term to /Users/rhafner/.atom/packages ✗

> pty.js@0.2.4 install /private/var/folders/8m/dml8ymnd5dz8b6r4fqzdw7x40000gn/T/apm-install-dir-1141017-7506-1sinivm/node_modules/term/node_modules/pty.js
> node-gyp rebuild

  CXX(target) Release/obj.target/pty/src/unix/pty.o

npm http GET https://registry.npmjs.org/term.js/0.0.3
npm http GET https://registry.npmjs.org/pty.js
npm http GET https://registry.npmjs.org/debounce/0.0.3
npm http GET https://registry.npmjs.org/keypather
npm http 200 https://registry.npmjs.org/debounce/0.0.3
npm http GET https://registry.npmjs.org/debounce/-/debounce-0.0.3.tgz
npm http 200 https://registry.npmjs.org/keypather
npm http GET https://registry.npmjs.org/keypather/-/keypather-1.7.5.tgz
npm http 200 https://registry.npmjs.org/term.js/0.0.3
npm http GET https://registry.npmjs.org/term.js/-/term.js-0.0.3.tgz
npm http 200 https://registry.npmjs.org/pty.js
npm http GET https://registry.npmjs.org/pty.js/-/pty.js-0.2.4.tgz
npm http 200 https://registry.npmjs.org/debounce/-/debounce-0.0.3.tgz
npm http 200 https://registry.npmjs.org/keypather/-/keypather-1.7.5.tgz
npm http 200 https://registry.npmjs.org/pty.js/-/pty.js-0.2.4.tgz
npm http 200 https://registry.npmjs.org/term.js/-/term.js-0.0.3.tgz
npm http GET https://registry.npmjs.org/nan/0.7.0
npm http GET https://registry.npmjs.org/extend
npm http 200 https://registry.npmjs.org/extend
npm http GET https://registry.npmjs.org/extend/-/extend-1.2.1.tgz
npm http 200 https://registry.npmjs.org/nan/0.7.0
npm http GET https://registry.npmjs.org/nan/-/nan-0.7.0.tgz
npm http 200 https://registry.npmjs.org/extend/-/extend-1.2.1.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-0.7.0.tgz
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

In file included from ../src/unix/pty.cc:16:
../node_modules/nan/nan.h:352:13: error: no member named 'New' in 'v8::String'
    return  _NAN_ERROR(v8::Exception::Error, errmsg);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:332:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:356:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:337:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../node_modules/nan/nan.h:356:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:337:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:332:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:361:9: error: no type named 'ThrowException' in namespace 'v8'
    v8::ThrowException(error);
    ~~~~^
../node_modules/nan/nan.h:368:65: error: no member named 'New' in 'v8::String'
    v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
                                                    ~~~~~~~~~~~~^
../node_modules/nan/nan.h:370:26: error: no member named 'New' in 'v8::String'
    obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
             ~~~~~~~~~~~~^
../node_modules/nan/nan.h:382:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::TypeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:332:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:386:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:337:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../node_modules/nan/nan.h:386:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:337:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:332:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:390:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::RangeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:332:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:394:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:337:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../node_modules/nan/nan.h:394:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:337:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:332:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:714:49: error: too few arguments to function call, single argument 'isolate' was not specified
    v8::Local<v8::Object> obj = v8::Object::New();
                                ~~~~~~~~~~~~~~~ ^
/Users/rhafner/.atom/.node-gyp/.node-gyp/0.18.0/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
In file included from ../src/unix/pty.cc:16:
../node_modules/nan/nan.h:720:49: error: too few arguments to function call, single argument 'isolate' was not specified
    v8::Local<v8::Object> obj = v8::Object::New();
                                ~~~~~~~~~~~~~~~ ^
/Users/rhafner/.atom/.node-gyp/.node-gyp/0.18.0/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
In file included from ../src/unix/pty.cc:16:
../node_modules/nan/nan.h:727:12: error: no member named 'Dispose' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    handle.Dispose();
    ~~~~~~ ^
../node_modules/nan/nan.h:728:12: error: no member named 'Clear' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    handle.Clear();
    ~~~~~~ ^
../node_modules/nan/nan.h:733:39: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
    NanPersistentToLocal(handle)->Set(NanSymbol("callback"), fn);
                                      ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:169:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^
/Users/rhafner/.atom/.node-gyp/.node-gyp/0.18.0/deps/v8/include/v8.h:1379:8: note: 'IsSymbol' declared here
  bool IsSymbol() const;
       ^
In file included from ../src/unix/pty.cc:16:
../node_modules/nan/nan.h:733:39: error: call to non-static member function without an object argument
    NanPersistentToLocal(handle)->Set(NanSymbol("callback"), fn);
                                      ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:169:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^~~~~~~~~
../node_modules/nan/nan.h:737:46: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
    return NanPersistentToLocal(handle)->Get(NanSymbol("callback"))
                                             ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:169:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^
/Users/rhafner/.atom/.node-gyp/.node-gyp/0.18.0/deps/v8/include/v8.h:1379:8: note: 'IsSymbol' declared here
  bool IsSymbol() const;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/8m/dml8ymnd5dz8b6r4fqzdw7x40000gn/T/apm-install-dir-1141017-7506-1sinivm/node_modules/term/node_modules/pty.js
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! pty.js@0.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pty.js@0.2.4 install script.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pty.js
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 14.0.0
npm ERR! command "/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/bin/node" "/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/.apmrc" "--userconfig" "/Users/rhafner/.atom/.apmrc" "install" "/private/var/folders/8m/dml8ymnd5dz8b6r4fqzdw7x40000gn/T/d-1141017-7506-c0lefl/package.tgz" "--target=0.18.0" "--arch=x64"
npm ERR! cwd /private/var/folders/8m/dml8ymnd5dz8b6r4fqzdw7x40000gn/T/apm-install-dir-1141017-7506-1sinivm
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/8m/dml8ymnd5dz8b6r4fqzdw7x40000gn/T/apm-install-dir-1141017-7506-1sinivm/npm-debug.log
npm ERR! not ok code 0

Roberts-MacBook-Pro-2:Provisioning rhafner$ 
mengzhongjack commented 7 years ago

I have the same problem ,could you tell me when solved it

tjmehta commented 7 years ago

Try the top solution for this question: http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error

tjmehta commented 7 years ago

This is an issue when installing any node modules that require compilation, and not limited to atom-term. Specifically you are failing to install pty (node_module). You are better off reporting this bug to npm, but it is expected behavior.

aaronliu0130 commented 4 years ago

I solved it by running this line:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

If you have XCode beta, however, then use this:

sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
aaronliu0130 commented 4 years ago

Now, if you also program with a language that also uses command line tools, be sure to run this command after you built and installed your software:

sudo xcode-select -s /Library/Developer/CommandLineTools

Also, the solution above does require xcode(or beta) installed.