nextstrain / nextstrain.org

The Nextstrain website
https://nextstrain.org
GNU Affero General Public License v3.0
87 stars 49 forks source link

Fix Gatsby proxy for dev #665

Closed joverlee521 closed 1 year ago

joverlee521 commented 1 year ago

Description of proposed changes

Prior to this commit, I was unable to load any individual Group page after starting the dev server with npm run dev. I would get the error:

TypeError: (intermediate value).createProxyServer is not a function

Since http-proxy only has a default export¹, so we must access the default property of the module in order to access the createProxyServer method.

¹ https://github.com/http-party/node-http-proxy/blob/master/index.js#L13

Related issue(s)

Follow up of #583

Testing