'How can I configure a TeamsFx app to run behind a corporate proxy?
Currently, when I try to debug my app locally using teamsfx preview --local, I cannot get the app to start. The app in question is the hello world example taken from the documentation so I don't believe this is related to how the app itself is structured.
To be more specific, after running the command I get the status bars loading on my console, but after everything goes to 100%, it stays that way, without giving me any more feedback:
$ teamsfx preview --local
████████████████████ 100% | [1/1] Node.js (√) Done.
████████████████████ 100% | [2/2] M365 Account (√) Done.
████████████████████ 100% | [2/2] Development certificate for localhost (√) Done.
████████████████████ 100% | [2/2] Ngrok (√) Done.
████████████████████ 100% | [1/1] Ports (√) Done.
████████████████████ 100% | [1/1] bot npm install (√) Done.
ngrok start: The log of this task can be found in: C:\Users\<my_user>\.fx\cli-log\local-preview\2022-04-18T14_44_37_066Z\ngrok-start.log
████████████████████ 100% | [1/1] ngrok start (√) Done.
████████████████████ 100% | [1/1] bot npm install (√) Done.
████████████████████ 100% | [3/3] Provisioning Azure AD app (√) Done.
████████████████████ 100% | [1/1] Local debugging (√) Done.
I have my proxy configured in Windows settings and have set the proxy and http-proxy variables on my .npmrc file. Is there someplace else I need to specify my proxy address? Or is the problem something I'm missing entirely?
Solution 1:[1]
Probably because the ngrok behind proxy is not successfully started. Do you find something in the ngrok log file?
C:\Users<my_user>.fx\cli-log\local-preview\2022-04-18T14_44_37_066Z\ngrok-start.log
How to solve this problem:
- Solve the ngrok issue and then run
teamsfx preview --localagain. - Or you can use your own tunneling service instead of ngrok. See here for the configuration.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kuojian Lu |
