tsd icon indicating copy to clipboard operation
tsd copied to clipboard

Update to be compatible with Node.js 0.12

Open lucaguada opened this issue 10 years ago • 17 comments

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?

lucaguada avatar Apr 13 '15 09:04 lucaguada

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

toedter avatar Apr 19 '15 08:04 toedter

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

blakeembrey avatar Apr 28 '15 23:04 blakeembrey

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.

lucaguada avatar Apr 29 '15 19:04 lucaguada

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

npm install tsd -g
npm WARN engine [email protected]: 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.

Linicks avatar May 21 '15 22:05 Linicks

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

blakeembrey avatar May 26 '15 19:05 blakeembrey

still doesn't work

/Users/nikos/.node/bin/tsd -> /Users/nikos/.node/lib/node_modules/tsd/build/cli.js

quantuminformation avatar Jun 18 '15 16:06 quantuminformation

@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.

blakeembrey avatar Jun 19 '15 03:06 blakeembrey

How do I do that? @blakeembrey

quantuminformation avatar Jun 19 '15 08:06 quantuminformation

@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.

blakeembrey avatar Jun 19 '15 08:06 blakeembrey

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

If I run tsd in terminal I get:

tsd command not found

quantuminformation avatar Jun 19 '15 09:06 quantuminformation

@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)?

blakeembrey avatar Jun 19 '15 09:06 blakeembrey

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

image

image

quantuminformation avatar Jun 19 '15 09:06 quantuminformation

@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.

blakeembrey avatar Jun 19 '15 09:06 blakeembrey

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 avatar Jun 19 '15 11:06 quantuminformation

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

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

quantuminformation avatar Jun 19 '15 11:06 quantuminformation

@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?

blakeembrey avatar Jun 19 '15 11:06 blakeembrey

Thanks, this is what I have: image

quantuminformation avatar Jun 19 '15 12:06 quantuminformation