NOTES TO SELF:
1) NPM problems on cygwin with PIPE and SPAWN for TAR. Basically tar returns an error (on cygwin) that should be ignored.
I changed npm/lib/utils/exec.js: function Pipe(...)
cp2.on("exit", function (code) {cp2._exited = trueif (errState) return// JORGE if (!code) return log.verbose(cp2.name || "", "success", cb) return log.verbose(cp2.name || "", "success", cb) log.error(buff2, cp2.name || "") cb(new Error( "Failed "+(cp2.name || "")+"\nexited with "+code))
And npm/lib/utils/tar.js (probably not necessary if above is changed):
function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {if (!dMode) dMode = DMODEif (!fMode) fMode = FMODElog.silly([dMode.toString(8), fMode.toString(8)], "gunzTarPerm modes")//console.error(npm.config.get("gzipbin")+" --decompress --stdout "// +tarball+" | "+npm.config.get("tar")+" -mvxpf - --no-same-owner -C "// +tmp)console.error("JORGE");pipe( spawn( npm.config.get("gzipbin"), ["--decompress", "--stdout", tarball], process.env, false ), spawn( npm.config.get("tar"), ["-mvxpf", "-", "--no-same-owner", "-C", tmp] // JORGE --ignore-failed-read, process.env, false ), function (er) {// if we're not doing ownership management,// then we're done now.if (er) return log.er(cb,"JORGE Failed unpacking "+tarball)(er)if (npm.config.get("unsafe-perm")) {
Also I had to manually install waf-1.5.16 (must be this version) in ~
And set my PYTHONPATH to:
export PYTHONPATH=/home/jorge/waf-1.5.16/wafadmin/Tools:/home/jorge/waf-1.5.16:/home/jorge/waf-1.5.16/wafadmin/:/usr/local/lib/node/wafadmin/Tools/:/home/jorge/node/tools
Basically, the whole process sucked on CYGWIN. I can never get the 8 hours I spent on this crap back.
Now, I am going to go do some node.js screen-scraping.
-- jorge.
1 comment:
It turns out to be a waste of time... native parts don't run on cygwin.
Post a Comment