$ phantomjs
phantomjs>
But can not install
phantom at my project work folder:
$ sudo npm install phantom
Password:
> we...@0.2.2 install /Users/maks/Dropbox/nodeApps/orgi/node_modules/phantom/node_modules/dnode/node_modules/weak
> node-gyp rebuild
xcode-select: Error: No Xcode is selected. Use xcode-select -switch <path-to-xcode>, or see the xcode-select manpage (man xcode-select) for further information.
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 18, in <module>
sys.exit(gyp.main(sys.argv[1:]))
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in main
return gyp_main(args)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 508, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2105, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 769, in Write
self.Pchify))
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1154, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 260, in GetCflags
sdk_root = self._SdkPath()
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 247, in _SdkPath
return os.path.join(self._GetSdkBaseDir(),
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 234, in _GetSdkBaseDir
raise Exception('Error %d running xcode-select' % job.returncode)
Exception: Error 2 running xcode-select
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:415:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Darwin 12.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/maks/Dropbox/nodeApps/orgi/node_modules/phantom/node_modules/dnode/node_modules/weak
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! we...@0.2.2 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the we...@0.2.2 install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "phantom"
npm ERR! cwd /Users/maks/Dropbox/nodeApps/orgi
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, lstat '/Users/maks/Dropbox/nodeApps/orgi/node_modules/phantom/node_modules/shoe/example/invert/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js'
npm ERR! If you need help, you may report this log at:
npm ERR! or email it to:
npm ERR! System Darwin 12.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "phantom"
npm ERR! cwd /Users/maks/Dropbox/nodeApps/orgi
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path /Users/maks/Dropbox/nodeApps/orgi/node_modules/phantom/node_modules/shoe/example/invert/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js
npm ERR! fstream_path /Users/maks/Dropbox/nodeApps/orgi/node_modules/phantom/node_modules/shoe/example/invert/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/maks/Dropbox/nodeApps/orgi/npm-debug.log
npm ERR! not ok code 0