workshopper / goingnative

A NodeSchool style workshopper for learning how to write native Node.js addons
MIT License
414 stars 54 forks source link

Does it work with Node 4.2 ? #66

Closed jacopofar closed 8 years ago

jacopofar commented 8 years ago

I'm having issues with exercise "mission impossible: part two", apparently node-gyp cannot download some files.

Jacopos-MacBook-Pro:~ utente$ goingnative verify myaddon
✓ package.json contains `"gypfile": true`
✓ binding.gyp includes a "myaddon" target
✓ binding.gyp includes "myaddon.cc" as a source file
✓ binding.gyp includes a correct NAN include statement
✗ Compile mock C++ to test JavaScript: node-gyp configure: 404 status code downloading SHASUMS.txt

# FAIL

Your solution to MISSION POSSIBLE: PART TWO didn't pass. Try again!

googling, I found that it is likely a problem with a file which changed name with the recent version of nodejs. I tried to remove my ~/.node-gyp folder and myaddon/node_modules, reinstall node-gyp and install the latest version of nan and bindings removing them from the package.json and reinstalling them from npm, but the problem persists.

Does goingnative 2.0.4 supports Node 4.2 ? I have no idea where to look to see which version of the files node-gyp is being asked to download.

jagandecapri commented 8 years ago

@jacopofar Yeah, I'm facing the same problem too. I believe it might because of the repo itself.

https://github.com/workshopper/goingnative/blob/master/package.json#L30

I cloned the repo and bumped up the version to the latest version of node-gyp. Running goingnative locally works fine.

FrenchBen commented 8 years ago

you can also just bump up the node-gyp version in the node_modules dir and do npm install.

$ npm install goingnative
$ cd node_modules/goingnative/
$ vi package.json

change the node-gyp version to the 'latest' "node-gyp": "~3.0.3" Then in the same node_modules dir, just install npm install You can then validate your add-on! woohoo

jacopofar commented 8 years ago

Thanks, with this edit I'm not stuck anymore. I had installed goingnative globally, so the file for me was in /usr/local/lib/node_modules/goingnative/package.json, but it worked nonetheless.

I'm still stuck with "Error: Could not locate the bindings file" but at least it's a different error

jacopofar commented 8 years ago

I solved the bingings file error, the binding name was spelt wrong