I have the following line of code in my node program that doesn’t work:
const axios = require(‘axios’);
I get the error:
require.js:168 Uncaught Error: Module name “axios” has not been loaded yet for context: _. Use require()
I ran the commands:
yarn add axios
npm install axios --save -g
but it still doesn’t find the module.
And when I try to get the version number with >axios -v, I get the error:
‘axios’ is not recognized as an internal or external command,
operable program or batch file.