DefinitelyTyped / tsd

[DEPRECATED] TypeScript Definition manager for DefinitelyTyped
Apache License 2.0
1.12k stars 135 forks source link

Update to be compatible with Node.js 0.12 #144

Open lucaguada opened 9 years ago

lucaguada commented 9 years ago

Hi there! I just updated my Node to version 0.12, but it seems tsd is not compatible with it, any plan for this (maybe in the next version 6.x, but I wasn't able to find anything about it)? or any workaround?

toedter commented 9 years ago

I would also be interested in running tsd with node 0.12.x

blakeembrey commented 9 years ago

@tryIO What version are you currently using? I haven't had any troubles, but I've mostly been running 0.6.

lucaguada commented 9 years ago

I used 0.12.0 and when I tried to install "tsd" it replied me that it needs NodeJS version greater than 0.6 and lesser than 0.11. I didn't re-tried recently, but I will do to check if everything is still the same.

Linicks commented 9 years ago

Here is a list of the warnings that I had during a recent install:

npm install tsd -g
npm WARN engine joi-assert@0.0.3: wanted: {"node":">= 0.10.0 <= 0.11.0"} (current: {"node":"2.0.0","npm":"2.9.0"})
npm WARN peerDependencies The peer dependency minichain@~0.0.1 included from minitable will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
blakeembrey commented 9 years ago

@Linicks Installing tsd should now be installing 0.6.0 instead of 0.5.x and it should fix this issue.

quantuminformation commented 9 years ago

still doesn't work

/Users/nikos/.node/bin/tsd -> /Users/nikos/.node/lib/node_modules/tsd/build/cli.js
blakeembrey commented 9 years ago

@QuantumInformation You're right, looks like someone already logged an issue on that package (https://github.com/Bartvds/joi-assert/issues/2). However, I'm not sure if it'll be updated so the best action might be to refactor and bring it inline with 0.6.x.

quantuminformation commented 9 years ago

How do I do that? @blakeembrey

blakeembrey commented 9 years ago

@QuantumInformation You're welcome to submit a pull request, it'll mostly just be copying and pasting the code into this codebase and replacing previous references of joi-assert to the new code. TSD will still work with this warning, since the code in that module doesn't actually have a dependency on those node versions.

quantuminformation commented 9 years ago

tsd fails to install for me: npm install tsd -g

If I run tsd in terminal I get:

tsd command not found

blakeembrey commented 9 years ago

@QuantumInformation It wouldn't be caused by this. Did you get any errors during installation? Do other node modules work for you (maybe you're bash path is incorrect)?

quantuminformation commented 9 years ago

other node modules work fine, I didn't get errors, this is what happened on install:

image

image

blakeembrey commented 9 years ago

@QuantumInformation So your node modules are being installed globally to /Users/nikos/.node/bin and you need to make sure that's in your path (echo $PATH). Have you tried installing any other modules globally and using their CLIs? From that output, you can see installation is successful - it's just the command is missing and I would say it's your path. You'll need edit your .bash_profile and add export PATH=/Users/nikos/.node/bin:$PATH to the end for it to work.

quantuminformation commented 9 years ago

my path:

/Users/nikos/.npm-packages/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

bash_profile : NPM_PACKAGES="/Users/nikos/.npm-packages" NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" PATH="$NPM_PACKAGES/bin:$PATH"

quantuminformation commented 9 years ago

adding export PATH=/Users/nikos/.node/bin:$PATH

got tsd working, I reckon my other cli modules got installed somewhere else. thanks!

blakeembrey commented 9 years ago

@QuantumInformation No worries :smile: Looks like your package directory has changed from .node to .npm-packages at some point. Maybe check that out since your packages might start being installed differently to what you're used to. I don't think I can help you too much there, but start by checking npm config --global get prefix and echo $NPM_CONFIG_PREFIX - perhaps its been changed somewhere?

quantuminformation commented 9 years ago

Thanks, this is what I have: image