workshopper / levelmeup

Level Me Up Scotty! An intro to Node.js databases via a set of self-guided workshops.
Other
271 stars 61 forks source link

Error when installing levelmeup #26

Closed brunops closed 10 years ago

brunops commented 10 years ago

When installing levelmeup, it complains about not having XCode installed (I have only the command-line tools) All other nodeschool levels were installed correctly (without sudo)

Error when running npm install -g levelmeup (same issue when running with sudo)

> leveldown@0.9.2 install /Users/brunosanches/Dropbox/projects/nodejs/node_modules/levelmeup/node_modules/level/node_modules/leveldown
> node-gyp rebuild

npm http GET https://registry.npmjs.org/bl
npm http 304 https://registry.npmjs.org/bl
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.

gyp: Error 2 running xcodebuild
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:424:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.5.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/brunosanches/Dropbox/projects/nodejs/node_modules/levelmeup/node_modules/level/node_modules/leveldown
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0
luk- commented 10 years ago

Your xcode command line tools on os x need to be configured before you can build this. If you Google 'xcode-select' you should find help on that.

brunops commented 10 years ago

Worked now, just updating with the command that fixed it

 $ sudo xcode-select -switch /Library/Developer
Pazzilivo commented 10 years ago

still have this issue

> leveldown@0.9.2 install /Users/pazz/.nvm/v0.10.21/lib/node_modules/levelmeup/node_modules/level/node_modules/leveldown
> node-gyp rebuild

npm http 304 https://registry.npmjs.org/bl
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

gyp: Error 1 running xcodebuild
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/pazz/.nvm/v0.10.21/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/Users/pazz/.nvm/v0.10.21/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/pazz/.nvm/v0.10.21/lib/node_modules/levelmeup/node_modules/level/node_modules/leveldown
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

after use command @brunops provides,I get this

xcode-select: error: invalid developer directory '/Library/Developer/'
rvagg commented 10 years ago

Do you have xcode installed? perhaps you should reinstall it. you should be able to get the command-line tools downloadable separately if you want to avoid the massive download of the whole thing. Details about what's needed across platforms is here: https://github.com/TooTallNate/node-gyp#installation

Pazzilivo commented 10 years ago

@rvagg I only installed the CLT separately, seems node-gyp have the same issue https://github.com/TooTallNate/node-gyp/issues/341