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

ied can't understand "latest" version label #74

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hey, first of all, congratulations for this project, it is really awesome and clever.

I'm unable to install any dependency with the latest version label, you can reproduce this by doing ied install async@latest

This was the error I got

/usr/local/lib/node_modules/ied/lib/install_cmd.js:65
        if (err) throw err
                       ^
Error: Unknown package spec: tag on async@latest
    at resolve (/usr/local/lib/node_modules/ied/lib/resolve.js:24:8)
    at fn (/usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:746:34)
    at /usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:1213:16
    at /usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:166:37
    at /usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:706:43
    at /usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:167:37
    at Object.async.waterfall (/usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:710:44)
    at install (/usr/local/lib/node_modules/ied/lib/install.js:137:9)
    at /usr/local/lib/node_modules/ied/lib/install_cmd.js:48:9
    at /usr/local/lib/node_modules/ied/node_modules/async/lib/async.js:356:13
just-boris commented 8 years ago

latest here is a tag. It needs a special logic to handle it. We don't understand tags for now, but it would be good to implement.

The condition in the resolve.js should pass tags to resolveFromNpm.

the resolveFromNpm function itself should resolve tag to the actual version using dist-tags property from the response from npm-registry.

Also, we need to save actual version rather than tag into package.json like NPM does it.

Checksum commented 8 years ago

I ran across certain packages like https://github.com/SheetJS/js-xlsx which do not mention any tag or version for some of its dependencies. Any thoughts on how to handle those? I would prefer installing the latest version for them.

just-boris commented 8 years ago

@Checksum in this context, tag is npm feature: https://docs.npmjs.com/getting-started/using-tags

michaelowens commented 8 years ago

I'm running into the same error. One of my projects' dependencies apparently uses async, so I can't use ied to install my dependencies. +1 to get this fixed.

just-boris commented 8 years ago

Well, I take it on myself and going to fix soon.

alexanderGugel commented 8 years ago

:+1: