Coder Social home page Coder Social logo

Comments (7)

LexVocoder avatar LexVocoder commented on May 19, 2024 2

Workaround is to run winpty ngrok instead of just ngrok. It looks like the problem is how Windows ngrok doesn't really know how to use the Windows console.

ngrok is certainly not alone in needing this treatment.

from ngrok.

inconshreveable avatar inconshreveable commented on May 19, 2024 1

Thanks @bubenshchykov! I've had a few reports of this as well, it's a known issue. Win10 bash is still in beta and ngrok doesn't officially support it yet. I'll try to get an environment up asap and figure out what's going on.

from ngrok.

bubenshchykov avatar bubenshchykov commented on May 19, 2024

hi man! as a quick test, can you try it with latest npm (3.10.5)

npm cache clean
npm i -g npm
npm i -g ngrok

i see that your environment is a bit out of date :)

info using [email protected]
3 info using [email protected]

If that doesn't help, you can try a potential fix I blindly pushed here, as I can't spin up windows vm at the moment #59
npm i github:bubenshchykov/ngrok#7f5db0d26 -g

Even if install succeeds, I don't think I ever managed to make global install working on windows - because of tricks with executables and "cmd" wrappers. The only option I see for now is to make a small node.js script "ngrok-global.js", which will spawn ngrok binary in child process and output it to the parent one. Then having "bin": { "ngrok": "node bin/ngrok-global"} should work cross-OS. Would be awesome if you can try it out.

from ngrok.

jdalton avatar jdalton commented on May 19, 2024

Cool! I'm using the current LTS release of Node with an npm from this June. Its v2 but not out of date. The ngrok install works fine globally on Windows 10. Bash on Win10 is Ubuntu (where the issue is).

from ngrok.

jdalton avatar jdalton commented on May 19, 2024

Ok so I thought I saw it complete once. Here's the complete install:

 ~ npm i -g ngrok
/home/jdalton/.nvm/versions/node/v4.4.7/bin/ngrok -> /home/jdalton/.nvm/versions/node/v4.4.7/lib/node_modules/ngrok/bin/ngrok

> [email protected] postinstall /home/jdalton/.nvm/versions/node/v4.4.7/lib/node_modules/ngrok
> node ./postinstall.js

ngrok - downloading binary https://bin.equinox.io/a/b87faFPKrii/ngrok-2.1.1-linux-amd64.tar.gz ...
ngrok - binary downloaded...
ngrok - binary unpacked.
[email protected] /home/jdalton/.nvm/versions/node/v4.4.7/lib/node_modules/ngrok
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])

after than though which ngrok will report /home/jdalton/.nvm/versions/node/v4.4.7/bin/ngrok
but executing it is a noop it just goes back to bash.

It noops on npm v3 too.
Is there some prerequisites that could be missing?

from ngrok.

bubenshchykov avatar bubenshchykov commented on May 19, 2024

No prerequisites..
For global install the flow is simple

  • postinstall downloads proper ngrok bin and puts it to bin folder (./ngrok/bin executable)
  • then package.json has this default "bin": {"ngrok": "./bin/ngrok"} which does this npm linking magic

Nothing really more..

There might be something wrong with timing of things: bin/ngrok is available only after postinstall, but npm symlinking seems to do smth even before.. That's why global install was failing before I put dummy ./bin/ngrok https://github.com/bubenshchykov/ngrok/blob/master/bin/ngrok - I had to add this craziness after recent npm releases )

Few random ideas to try

The way npm symlinking works has been changed over the last year I think, I might be missing some small detail - but honestly I'm out of good clues for now. Any ideas are welcome :)

from ngrok.

bubenshchykov avatar bubenshchykov commented on May 19, 2024

@inconshreveable Alan people say ngrok is not working on Windows 10 bash, even if downloaded directly ngrok.com (#60)

from ngrok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.