ngrok command not found

前端 未结 17 997
借酒劲吻你
借酒劲吻你 2020-12-22 18:54

I\'m trying to install ngrok (which I\'ve been using for a while on Windows with no issues) on my 1 week old yosemite and these are the steps I\'ve followed so

相关标签:
17条回答
  • 2020-12-22 19:48

    add line in .zshrc

    # vi .zshrc
    
    alias ngrok="/usr/local/lib/node_modules/node/lib/node_modules/node/lib/node_modules/ngrok/bin/ngrok"
    
    0 讨论(0)
  • 2020-12-22 19:48

    Ngrok can be installed with Yarn , then you can run by power Sheel. it's was the only way that worked for me in windows 10 . In the begin you need to install the Node : https://nodejs.org/en/. and the yarn: https://nodejs.org/en/.

    0 讨论(0)
  • 2020-12-22 19:50

    Short answer: Put the executable file in /usr/local/bin instead of applications. You should now be able to run commands like ngrok http 80.

    Long answer: When you type commands like ngrok in the terminal, Macs (and other Unix OSs) look for these programs in the folders specified in your PATH. The PATH is a list of folders that's specified by each user. To check your path, open the terminal and type: echo $PATH.

    You'll see output that looks something like: /usr/local/bin:/usr/bin:/bin. This is a : separated list of folders.

    So when you type ngrok in the terminal, your Mac will look for this executable in the following folders: /usr/local/bin, /usr/bin/ and /bin.

    Read this post if you are interested in learning about why you should prefer usr/local/bin over other folders.

    0 讨论(0)
  • 2020-12-22 19:53

    For installation in Windows : Download and extract to any directory (lets say c drive)

    • Then double click on the extracted ngrok.exe file and you'll be able to see the command prompt.

    • And just type ngrok http 4040 // here I am exposing [port 4040]

    0 讨论(0)
  • 2020-12-22 19:53

    run npm install ngrok --g a very simple way to install

    0 讨论(0)
提交回复
热议问题