docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

Module not found: Error: Can't resolve 'https-proxy-agent'

Open KeinTung opened this issue 3 years ago • 12 comments

My CICD Building phase failed with the following error:

Module not found: Error: Can't resolve 'https-proxy-agent' in '/home/runner/work/wechaty.js.org/wechaty.js.org/docusaurus/node_modules/@redocly/openapi-core/lib/redocly'

I checked StackOverflow and it seems to be the network error

KeinTung avatar Feb 11 '22 20:02 KeinTung

  • @huan My mid-term PR's CICD passed 3 days ago, and I finished my final blog on the final branch based on sales-mid-term branch. There is only minimal changes (blog+asset) but resulted in a package error. So I really think there is a change in the CICD scripts or source code which resulted in this issue. To make sure it is not caused by me, I created a new branch, test-final, which has the exact same code as sales-mid-term branch and failed the CICD. So I really wish you can help me fix this package dependency error. Thanks!

KeinTung avatar Feb 12 '22 07:02 KeinTung

Please contact your mentor, thank you very much.

huan avatar Feb 12 '22 07:02 huan

@huan I suppose this CICD bug is due to the recent modification in wechaty.js.org. Shouldn't I contact the managers of this repo?

KeinTung avatar Feb 12 '22 07:02 KeinTung

Ok, If you believe you ran into CI/CD bug, you can post the problem after you confirm it by following the below steps:

  1. try to reproduce the problem in your local environment by running npm run build, and make sure it works in your local environment. If it passes, then go to 2; If not, you need to figure it out in your local environment;
  2. if you can pass 1 but fail to pass the GitHub actions, please try to reproduce the GitHub actions problem in your local environment, and then provide the reproducible steps in your issue in detail.

Please feel free to let me know if you have more questions.

huan avatar Feb 12 '22 07:02 huan

Got it, thanks

KeinTung avatar Feb 12 '22 07:02 KeinTung

@huan I replicated the bug in my local environment. The issue is that the main branch lack the following 3 packages:

  • https-proxy-agent
  • net
  • tls

I installed it in my branch and it now passed the CI/CD. However, I suppose others will face the same issue so the dependency issue needs to be fixed.

KeinTung avatar Feb 12 '22 08:02 KeinTung

This is my final branch which passed the test.

KeinTung avatar Feb 12 '22 08:02 KeinTung

Great to know you have figured the problem out and have a fix for it!

Please update your PR so that it can make your PR pass the tests, then you will be able to move forward wth your mentors.

huan avatar Feb 12 '22 08:02 huan

@huan Thanks a lot for your comments and suggestions! There's still one remaining question: Will this dependency issue be solved after my PR is merged into the main branch? Or should others solve this issue again?

KeinTung avatar Feb 12 '22 08:02 KeinTung

I'm not sure where this problem comes in because our main branch was good before, but it seems that it fails too right now.

I think we can merge the new dependencies if those are the only changes to fix it.

huan avatar Feb 12 '22 08:02 huan

OK, , please notify me if my PR is merged or if other related patch is merged by you. I will also be aware of this fix too.

KeinTung avatar Feb 12 '22 08:02 KeinTung

@KevinTung Please help us to close this issue if it has been solved, thank you very much!

huan avatar Mar 24 '22 04:03 huan