arkency/reactjs_koans

setup didn't work os x (please help)

kangkyu opened this issue · 9 comments

npm run setup gave out errors copy and paste my ~/reactjs_koans/npm-debug.log file here

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/4.1.1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'setup' ]
2 info using npm@2.13.1
3 info using node@v4.1.1
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info presetup reactjs_koans@0.0.3
6 info setup reactjs_koans@0.0.3
7 verbose unsafe-perm in lifecycle true
8 info reactjs_koans@0.0.3 Failed to exec setup script
9 verbose stack Error: reactjs_koans@0.0.3 setup: `npm install && ncp koans/ exercises/`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:817:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid reactjs_koans@0.0.3
11 verbose cwd /Users/ugp/code/reactjs_koans
12 error Darwin 14.5.0
13 error argv "/usr/local/Cellar/node/4.1.1/bin/node" "/usr/local/bin/npm" "run" "setup"
14 error node v4.1.1
15 error npm  v2.13.1
16 error code ELIFECYCLE
17 error reactjs_koans@0.0.3 setup: `npm install && ncp koans/ exercises/`
17 error Exit status 1
18 error Failed at the reactjs_koans@0.0.3 setup script 'npm install && ncp koans/ exercises/'.
18 error This is most likely a problem with the reactjs_koans package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     npm install && ncp koans/ exercises/
18 error You can get their info via:
18 error     npm owner ls reactjs_koans
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

That doesn't give much info... Is there an npm-debug.log file in the directory where you ran npm setup?

If you look at the setup script in package.json, you can see that it doesn't actually do much... First thing I'd try is running npm install by hand.

npm install jsdom

Found this "jsdom" module gives out the error. I tried after that

brew install iojs
npm install -g node-gyp
npm install jsdom

and got the same error. I found this error here too:
brianmcd/contextify#184

In the issue you linked to, it looks like node-gyp is causing the issue.

However, since you continued and installed jsdom, it sounds like it's jsdom that's causing the error on your system? Can you post the debug log?

I post the debug log file after npm install jsdom here https://gist.github.com/kangkyu/0bea2b786daf4c36b023

Error is around 7000 in the log but it doesn't say why. See if you can install contextify and node-gyp by hand and get better logs.

If node-gyp is failing, you probably have an old or bad version of Node installed. I'd suggest installing the latest using a tool like nvm.

npm install node-gyp was fine, but npm install contextify still giving out the errors, I installed node 4.1.1 using nvm.

node v4.1.1
npm 3.3.4

iojs-v3.3.1

Thank you again - debug log here https://gist.github.com/kangkyu/08f29e77ec5e0cd18ac6

Up and running now. I suspect it's a problem of contextify and new node version, however

nvm use 0.12
npm run setup

Thank you for this Koans way!

lol wth we need to use 0.12?
Anyway, great work, thanks for sharing!

It's already fixed.