Not building on OS X El Capitain
I'm trying to build from source:
$ script/bootstrap
Node: v4.1.1
npm: v1.4.28
---> Installing N1 build tools
This goes inside the `build` folder and runs `npm install`
It will use the system `npm` to bootstrap our own N1 npm.
Our build tools (like Grunt) need to be compiled against Node via `npm`.
Everything else needs to be compiled against Chromium with `apm`.
$ /Users/dankle/bin/N1/build/node_modules/.bin/npm --userconfig=/Users/dankle/bin/N1/.npmrc install --loglevel error --cwd=/Users/dankle/bin/N1/build --ignoreStdout=true
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
gyp: /Users/dankle/.node-gyp/4.1.1/common.gypi not found (cwd: /Users/dankle/bin/N1/build/node_modules/runas) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/dankle/bin/N1/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "/usr/local/Cellar/node/4.1.1/bin/node" "/Users/dankle/bin/N1/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/dankle/bin/N1/build/node_modules/runas
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
gyp: /Users/dankle/.node-gyp/4.1.1/common.gypi not found (cwd: /Users/dankle/bin/N1/build/node_modules/grunt-electron-installer/node_modules/asar/node_modules/chromium-pickle) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/dankle/bin/N1/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "/usr/local/Cellar/node/4.1.1/bin/node" "/Users/dankle/bin/N1/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/dankle/bin/N1/build/node_modules/grunt-electron-installer/node_modules/asar/node_modules/chromium-pickle
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the runas 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 runas
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 15.0.0
npm ERR! command "/usr/local/Cellar/node/4.1.1/bin/node" "/Users/dankle/bin/N1/build/node_modules/.bin/npm" "--userconfig=/Users/dankle/bin/N1/.npmrc" "install" "--loglevel" "error"
npm ERR! cwd /Users/dankle/bin/N1/build
npm ERR! node -v v4.1.1
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Not being used to either node nor javascript, I've no idea where to go from here.
cheers
:+1:
@dakl - I don't have the solution, but you can do some googling to get more context. I'd search for more info on these errors:
gyp ERR! stack Error:gypfailed with exit code: 1- and since it's a configuration error, look that the
configure.jsfile located atN1/build/node_modules/npm/node_modules/node-gyp/lib/configure.js. Line 343 is establishing something that is conflicting with something else.
Hope that helps to at lease give you more info about what's going wrong.
See https://github.com/nylas/N1/issues/12
Uninstalling the node version provided by Ruby Gems (sudo gem uninstall node) and installing a stable 0.10 version from the node website fixed it for me.
Could this be part of a CI build tool to help catch items like this on various OS flavours?
Hi folks—sorry for the hassle. If you install Node 0.10.x, that should resolve the problem. We'll be updating script/bootstrap to check the node version today. We've also updated CONTRIBUTING.md to mention it explicitly.
We use Jenkins internally to build on Mac / Linux / Windows, but unfortunately they all use Node 0.10.x.
If you don't want to uninstall your current node version, I highly recommend nvm: https://github.com/creationix/nvm. It allows you to have multiple versions installed and switch between them (like rvm).