Closed binajmen closed 2 years ago
In the Blues stack, there's a "conflict" between MSW & Axios.
MSN are aware of the issue in https://github.com/mswjs/msw/issues/1182#issuecomment-1090476127:
The latest MSW has an issue with how Axios works (see #1169).
You can temporarily downgrade MSW to 0.36.8.
Had the same problem. Removed --require ./mocks
from dev:server
-script in package.json
as a temporary fix. Guess I won't be mocking third party resources until this is fixed.
You can temporarily downgrade MSW to 0.36.8.
Just throwing this in here that downgrading to 0.36.8 to attempt to fix https://github.com/muxinc/mux-node-sdk seemingly broke aws-sdk/client-s3
. I've had to disable mocks in dev for now. Just putting this here in case anyone one else runs across it. Took me a few hours to realize there was even MSW in the stack that would be intercepting the sdk requests in dev.
What version of Remix are you using?
1.4.1
Steps to Reproduce
Use
axios
to query a third party serviceExpected Behavior
Working query
Actual Behavior
Hi,
I've translated the
axios
request to the equivalent infetch
. It works flawlessly withfetch
, it doesn't withaxios
(nothing happens till I kill the request – addingtimeout: 1000
will throw a timeout error).Correctly returns:
The
axios
equivalent doesn't:I migrated (copy/paste + fixed some import) my files from an old project (
"remix": "^1.2.3"
) to the Blues stack ("@remix-run/node": "^1.4.1"
). The latest query worked in the old environment. Could it be a change was introduced in the newest version?I'm also using a third party library with
axios
as a dependency. Not working neither. Surely I did something wrong :sweat: