clux / modul8

NO LONGER MAINTAINED - browserify is too similar and is better (see issues)
http://clux.github.com/modul8
MIT License
22 stars 4 forks source link

Using globally installed modul8 #19

Open ghost opened 11 years ago

ghost commented 11 years ago

It must not write anything into node's installation path, except during install process itself:

$ modul8 build/build.js -z
fs.js:338
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: EACCES, permission denied '/opt/node-v0.8.11/lib/node_modules/modul8/deputy.json'
    at Object.fs.openSync (fs.js:338:18)
    at Object.fs.writeFileSync (fs.js:756:15)
    at save (/opt/node-v0.8.11/lib/node_modules/modul8/node_modules/deputy/index.js:23:12)
    at Function.module.exports.deputy.find (/opt/node-v0.8.11/lib/node_modules/modul8/node_modules/deputy/index.js:40:13)
    at Analyzer.module.exports.deputy (/opt/node-v0.8.11/lib/node_modules/modul8/node_modules/deputy/index.js:31:23)
    at Analyzer.dependencies (/opt/node-v0.8.11/lib/node_modules/modul8/lib/analyzer.js:51:15)
    at Analyzer.buildTree.build (/opt/node-v0.8.11/lib/node_modules/modul8/lib/analyzer.js:96:27)
    at Analyzer.buildTree (/opt/node-v0.8.11/lib/node_modules/modul8/lib/analyzer.js:121:9)
    at new Analyzer (/opt/node-v0.8.11/lib/node_modules/modul8/lib/analyzer.js:27:8)
    at module.exports (/opt/node-v0.8.11/lib/node_modules/modul8/lib/analyzer.js:191:11)

Of course, mentioned file is readable:

$ ls -lh  /opt/node-v0.8.11/lib/node_modules/modul8/deputy.json
-rw-r--r-- 1 root root 1 Jul  3  2012 /opt/node-v0.8.11/lib/node_modules/modul8/deputy.json
clux commented 11 years ago

Ah, yeah. That makes sense and should have been done better - I just wanted to hide this caching from the user, but it was the wrong choice. Funny no-one has said anything about that till now.

At any rate, I have abandoned this project because of other failures that are generally accounted for in browserify (see issues). You should probably use that.