Open EnriqueVidal opened 12 years ago
I did notice Checking for node path: not found
but node is installed and no other npm package complains. Please advise.
quickfix: sudo ln -sf /usr/local/include/node/node.h /usr/local/include/node/ev.h CXXFLAGS=-I/usr/local/include/node/uv-private/ npm install hashlib
It compiles, but when i require('hashlib') i get cannot find module 'hashlib' - so there is something missing.
ahh, full path:
var hashlib = require('./node_modules/hashlib/build/Release/hashlib');
Now it works
Where do I set that variable?
Which variable? If you mean the first post you can paste those two lines in you terminal. The first one will make a link from node to ev.h as ev.h is now gone and everything is in node.h. And the second sets an environmen variable for npm so the compiler can find the other sources.
If you mean the second post, it's in your project. e.g app.js or something
Remember to do the same with eio.h:
# sudo ln -sf /usr/local/include/node/node.h /usr/local/include/node/eio.h
and copy it to the root file:
# cp ./build/Release/hashlib.node ~/.node_libraries/hashlib.node
You can drop the long path if you go into the package.json file and swap "Release" in place of "Default" in the main and directories entries.
"main": "build/Release/hashlib",
"directories": {
"lib": "./build/Release"
},
I was able to install hashlib on Snow Leopard but in Lion this is the output I see: