Axios can't find isAxiosError.js

Viewed 2908

I can't seem to correct this error and I'm hoping someone has some insights into some other areas I can be checking. I know it means that the file can't but found but it is definitely is there.

Error: ENOENT: no such file or directory, open '/var/www/html/node_modules/axios/lib/helpers/isAxiosError.js'

Running cat /var/www/html/node_modules/axios/lib/helpers/isAxiosError.js returns the file is there.

cat /var/www/html/node_modules/axios/lib/helpers/isAxiosError.js
'use strict';

/**
 * Determines whether the payload is an error thrown by Axios
 *
 * @param {*} payload The value to test
 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
 */
module.exports = function isAxiosError(payload) {
  return (typeof payload === 'object') && (payload.isAxiosError === true);
};

I've gone through a range of NPM commands but nothing is working:

npm uninstall axios
npm cache clean --force
npm install axios
rm -rf node_modules && npm install

Mix is successfully compiling the files required and throwing no errors. Any help would be appreciated.

NPM7, Node v15.7.0

0 Answers
Related