Localtunnel: 'lt' Command not found

Created on 17 Jul 2018  Â·  6Comments  Â·  Source: localtunnel/localtunnel

'lt' doesnt seem to be in PATH

Most helpful comment

Hey, looks like you were right on the 💵 💪

My npm config get prefix was set to my home directory (not sure how that happened).
So used, npm config set prefix /usr/local and now it works.

Thanks for that! ✨

All 6 comments

I'm having this problem too. I installed localtunnel globally, but no success. In troubleshooting, I've read that it's not added to $PATH correctly... but when I try to find the binary for it, the search yields no results .. so I am unable to add the location to path since I don't know where it is ¯_(ツ)_/¯

$ lt --port 3000
bash: lt --port 3000: command not found
$ whereis lt
$ whereis localtunnel
$ ls /usr/local/lib/node_modules/npm/node_modules/ | grep -i "^loc"
locate-path
lock-verify
lockfile
$ ls /usr/local/lib/node_modules/npm/node_modules/ | grep -i "^lt"

localtunnel uses bin in package.json to automatically add lt to the PATH.

It should be installed in your node_modules bin directory, wherever that is. It depends on if you've installed globally or locally. The package.json docs explain:

https://docs.npmjs.com/files/package.json#bin

localtunnel uses bin in package.json to automatically add lt to the PATH.

This isn't true for me, and it seems others are having the same issue ... I've checked my path after repeatedly uninstalling and reinstalling. The location isn't added to my path.

The entry for bin in localconnect's package.json designates "./bin/client", where does this leave global installs ?

Not sure why you'd close this since neither of us have resolved our problems here ?

The bin entry tells npm to copy ./bin/client to <bin folder>/lt, so if it's installed globally, it's in your global node_modules folder's bin subdirectory.

If it's not in your PATH, it's probably an issue with your node setup, not an issue with this specific repository.

Hey, looks like you were right on the 💵 💪

My npm config get prefix was set to my home directory (not sure how that happened).
So used, npm config set prefix /usr/local and now it works.

Thanks for that! ✨

Np. Glad I could help :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kdoggthebus picture kdoggthebus  Â·  9Comments

adrienrn picture adrienrn  Â·  15Comments

rr20eid10 picture rr20eid10  Â·  4Comments

Scarwolf picture Scarwolf  Â·  13Comments

nitingupta220 picture nitingupta220  Â·  5Comments