“Uncaught SyntaxError: import declarations may only appear at top level of a module”:1:18 asking again
问题 Full code here: https://github.com/vscodr/axios_issue Been away from JS for a minute or two working in python and now I want to try to accomplish some of the same tasks I have been working on in python, with JS. I can't get past the stupidest thing! With Axios installed as a dependency, "dependencies": { "axios": "^0.19.2" } Trying to use axios from line number one of the script: import axios from 'axios' r = axios.get('https://swapi.dev') console.log(r) I keep getting: Uncaught SyntaxError: