alexanderGugel / ied

:package: Like npm, but faster - an alternative package manager for Node
http://alexandergugel.github.io/ied
MIT License
1.99k stars 53 forks source link

No support for --global option? #18

Closed skatsuta closed 9 years ago

skatsuta commented 9 years ago

I encountered the following error.

$ ied i -g jshint
module.js:339
    throw err;
    ^

Error: Cannot find module '/Users/skatsuta/package.json'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at installCmd (/usr/local/lib/node_modules/ied/lib/install_cmd.js:18:15)
    at /usr/local/lib/node_modules/ied/bin/cmd.js:56:7
    at Object.<anonymous> (/usr/local/lib/node_modules/ied/bin/cmd.js:100:2)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)

Doesn't ied support --global option? I'd be glad if it does.

alexanderGugel commented 9 years ago

ied currently does not support global installs. They're coming. Very soon. You can already link packages globally, installing them globally isn't that different.

But the reason you got an error wasn't that --global is not support, but you actually told ied to installs the dependencies of the package you're currently in, but since you don't have a package.json in your root, this command failed.

The order of commands and flags currently matters in ied (as explained in #12), which means you would want to do ied install jshint --some-flag.

skatsuta commented 9 years ago

@alexanderGugel Ah, I got it. As @zhuangya said in #12 it's a little confusing, since many people may think ied can be used in the same way as npm. It'd be better if it's written in a document. However thank you so much for developing a great tool!