0👍
Faced the same problem. Solved only by freezing axios version in package.json
Steps:
- delete
package-lock.json
- delete
node_modules/
folder - edit
package.json
change"@ nuxtjs / axios": "^ 5.3.6"
on"@ nuxtjs / axios": "5.3.6"
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
Source:stackexchange.com