No sé por qué no tengo ningún resultado en mi consola, hice mi mapa package.json con index.js
PD: lo puse en la raiz de mi proyecto
package.json :
{ "name": "MyProject", "version": "0.1.0", "private": true, "main": "index.js", "scripts": { "start": "node server/index.js", "dev": "nodemon server/index.js", "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "axios": "^0.25.0", "body-parser": "^1.19.2", "core-js": "^3.6.5", "cors": "^2.8.5", "express": "^4.17.3", "moment": "^2.29.1", "mongoose": "^6.2.3", "pinia": "^2.0.0-rc.10", "vue": "^3.0.0", "vue-router": "^4.0.12" }, Mi index.js
import axios from "axios"; const response = axios.get("http://jsonplaceholder.typicode.com/posts"); console.log(response); En mi terminal cuando npm run serve
App running at: - Local: http://localhost:8080/ - Network: http://192.168.1.17:8080/ Note that the development build is not optimized. To create a production build, run npm run build....pero nada en mi consola