Closed bard closed 11 years ago
It seems that the cause of problem is $NODE_PATH
, but I don't know how to reconcile the problem in the build script.
Here is a workaround for local installation.
NODE_PATH=../node_modules npm install node-icu-charset-detector
OK, I'll investigate a more smarter way.
I've fixed the problem in 8e60df9a039adc6c215437307ba8d03552aa6cca
Works perfect, thank you!
I spoke too soon. It installs, but in package.json I had to change:
"main": "./build/default/lib/node-icu-charset-detector",
Into:
"main": "./build/Release/obj.target/node-icu-charset-detector",
Or I would get an error when require()ing the module (no ./build/default/lib gets created on my system).
When actually using the module, I now get:
node: symbol lookup error: /tmp/test/node-icu-charset-detector/build/Release/obj.target/node-icu-charset-detector.node: undefined symbol: ucsdet_open_48
Update: adding the following to binding.gyp fixes it for me:
'link_settings': {
'libraries': [
'-licui18n'
]
}
Oops. I didn't have enough tests. Thank you very much for the suggestions.
I've fixed installation scripts, both node-waf
and node-gyp
, and checked that this change suppresses installation failures in several environments.
Confirmed as now working out of the box for me. Thanks!
It appears that installation is attempted to the system directory despite no -g flag being given to npm. Session transcript and npm-debug.log below.
npm-debug.log: