graphql icon indicating copy to clipboard operation
graphql copied to clipboard

connect ECONNREFUSED 127.0.0.1:4001 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)

Open mrhouzlane opened this issue 2 years ago • 3 comments

While running npm run test , I have this error :

Screenshot 2022-08-31 at 19 48 19

Environment : Ubuntu node version : v18.8.0

Screenshot 2022-08-31 at 19 50 00

mrhouzlane avatar Aug 31 '22 18:08 mrhouzlane

It looks like Mirage isn't set up quite right or possibly not properly intercepting network requests. Mirage should intercept network requests so you never get to this point. From the error you shared, there aren't any clues that point to one of those problems or the other.

jneurock avatar Aug 31 '22 18:08 jneurock

It looks like Mirage isn't set up quite right or possibly not properly intercepting network requests. Mirage should intercept network requests so you never get to this point. From the error you shared, there aren't any clues that point to one of those problems or the other.

I have installed mirage : npm install --save-dev miragejs @miragejs/graphql

The error may is related to the port, but it is not obvious for this case.

mrhouzlane avatar Aug 31 '22 18:08 mrhouzlane

Did you configure Mirage after the install? If so, can you share the config? If not, you'll need to configure it to run when you want.

jneurock avatar Aug 31 '22 20:08 jneurock