Shopify / hydrogen-v1

React-based framework for building dynamic, Shopify-powered custom storefronts.

Home Page:https://shopify.github.io/hydrogen-v1/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]Crashed when using API routes as a proxy.

FriedRiceNoodles opened this issue · comments

Describe the bug
Crashed when using API routes as a proxy like https://github.com/scottdixon/hydrogen-proxy-example.

To Reproduce
https://github.com/scottdixon/hydrogen-proxy-example

Screenshots
image

  • Hydrogen version 1.6.6
  • Node version 16.15.0

It looks like a bug of node-fetch, so I console the err then get:
image

node-fetch/node-fetch#1219

This bug has appeared since 2.6.8, and be fixed at 3.x(they said).
(2.6.7 is OK,I tried.)

So maybe the easiest way to solve this problem is to lock the version of node-fetch to 2.6.7.

Why do I need to use API routes as a proxy:
Shopify/hydrogen#1724