'lt' doesnt seem to be in PATH
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:
localtunnel uses bin in
package.jsonto automatically addltto 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 :)
Most helpful comment
Hey, looks like you were right on the 💵 💪
My
npm config get prefixwas set to my home directory (not sure how that happened).So used,
npm config set prefix /usr/localand now it works.Thanks for that! ✨