[Vuejs]-File download using AXIOS getting TypeError: Cannot use 'in' operator to search for 'validateStatus' in blob

0👍

Faced the same problem. Solved only by freezing axios version in package.json
Steps:

  1. delete package-lock.json
  2. delete node_modules/ folder
  3. edit package.json change "@ nuxtjs / axios": "^ 5.3.6" on "@ nuxtjs / axios": "5.3.6"
  4. npm i

0👍

We got the same error on a delete.

Cannot use 'in' operator to search for 'validateStatus'

This was fixed by removing a redundant parameter that is now treated as config.

The Axios.delete method does not have a data parameter, and the validation was improved in 0.20.0

-1👍

try using the javascript template literal syntax

axios.get(`/api/file/${res}`)

Anything sent in the axios request after the URL parameter will be treated as a config object

Leave a comment