How can I solve error occurred while proxying request? RedwoodJS

551 Views Asked by At

I'm following RedwoodJS Tutorial - Getting Dynamic and there's a proxy error when requesting localhost:8910/posts

api | API listening on http://localhost:8911/
api | GraphQL endpoint at /graphql
api | 11:14:25  Server listening at http://[::]:8911
web | <e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:8910/graphql to http://[::1]:8911/ [ENETUNREACH] (https://nodejs.org/api/errors.html#errors_common_system_errors)
2

There are 2 best solutions below

0
On

Ensure that your node and yarn versions match the prerequisites;

node: ">=14.19 <=16.x"
yarn: ">=1.15"
0
On

you can add RWJS_DEV_API_URL="http://localhost" to your environment variable; either by running RWJS_DEV_API_URL=“http://localhost” yarn rw dev or as a new line to your .env file