axios doesn't load

node , axios , module United States
  • 11 months ago

    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.

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson