Getting SyntaxError on Sublime Text When Importing Modules

Viewed 40

So this issue I have having seems to be exclusive to Sublime as running this same code in VS gives me no issues what so ever. This may be a very simple fix, but as a new user to Sublime, I am left scratching my head.

Here is the error I am getting:

const axios = require('axios');
          ^
SyntaxError: invalid syntax

This is also the first line of the file, so I am not sure if this is a contributing factor. Thank you to all who respond and help me out, and I apologize if this is simply a stupid mistake/oversight on my part.

0 Answers
Related