Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

489
Views
Vetur no puede encontrar el paquete.json

Estaba escribiendo código para mi aplicación con Vue y todo funcionó perfectamente. Luego comencé a crear componentes secundarios y ya no pude actualizar el host local.

Ahora dice:

"Vetur no puede encontrar 'paquete.json" y "Vetur no puede encontrar 'tsconfig.json' o 'jsconfig.json"

y cuando trato de "npm ejecutar servir" en el cmd, obtengo esto:

 C:\Users\cmana\Desktop\WebDeveloper\Vue app\vuetify-todo>npm run serve npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\cmana\Desktop\WebDeveloper\Vue app\vuetify-todo\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\cmana\Desktop\WebDeveloper\Vue app\vuetify-todo\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\cmana\AppData\Roaming\npm-cache\_logs\2021-04-07T12_03_13_953Z-debug.log

De acuerdo con este https://vuejs.github.io/vetur/guide/setup.html#project-setup - Traté de agregar el archivo jsconfig.json con este contenido. (Eliminé todos los componentes secundarios, así que solo me quedan estos archivos vue (Acerca de, Todo, Aplicación).)

 { "include": [ "./src/views/About.vue", "./src/views/Todo.vue", "./src/App.vue" ] }

Aún nada. ¿Alguien tiene alguna idea? Gracias <3

over 4 years ago · Santiago Trujillo
5 answers
Answer question

0

La instalación de la extensión EsLint debería resolver su problema

si está en VS Code, busque la extensión EsLint por editor: "Dirk Baeumer", instálela y apruebe la instalación para iniciar el servidor EsLint

Alternativamente, ejecute esto en la terminal npm install eslint en su espacio de trabajo

El archivo package.json se modifica y su servidor volverá a estar activo

para obtener más información sobre la extensión EsLint, puede consultar https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

¡Buena suerte!

over 4 years ago · Santiago Trujillo Report

0

en código VSC

ctrl + p
abrir configuración.json
agrega esta línea:

 "vetur.ignoreProjectWarning": true,

esto ignorará el error.

over 4 years ago · Santiago Trujillo Report

0

En primer lugar, en el código de Visual Studio, escriba:

Ctrl + Mayús + p

Este comando, abrirá esta ventana

ingrese la descripción de la imagen aquí

Escriba: settings json en la barra de búsqueda, así:

ingrese la descripción de la imagen aquí

Abra la primera opción: " Abrir configuración (JSON) ".

Ahora, en el archivo JSON, agregue esto: "vetur.ignoreProjectWarning": true, al final del archivo, así:

ingrese la descripción de la imagen aquí

¡Reinicia Visual Studio Code y listo!

over 4 years ago · Santiago Trujillo Report

0

Agregue "vetur.config.js" fuera de su proyecto.

En este ejemplo a continuación, "vetur.config.js" se agrega fuera del proyecto "vueProject" :

ingrese la descripción de la imagen aquí

La reducción de "vueProject" se ve más clara:

ingrese la descripción de la imagen aquí

Luego, pegue este código a continuación en "vetur.config.js" :

 // vetur.config.js /** @type {import('vls').VeturConfig} */ module.exports = { // **optional** default: `{}` // override vscode settings // Notice: It only affects the settings used by Vetur. settings: { "vetur.useWorkspaceDependencies": true, "vetur.experimental.templateInterpolationService": true }, // **optional** default: `[{ root: './' }]` // support monorepos projects: [ './packages/repo2', // shorthand for only root. { // **required** // Where is your project? // It is relative to `vetur.config.js`. root: './packages/repo1', // **optional** default: `'package.json'` // Where is `package.json` in the project? // We use it to determine the version of vue. // It is relative to root property. package: './package.json', // **optional** // Where is TypeScript config file in the project? // It is relative to root property. tsconfig: './tsconfig.json', // **optional** default: `'./.vscode/vetur/snippets'` // Where is vetur custom snippets folders? snippetFolder: './.vscode/vetur/snippets', // **optional** default: `[]` // Register globally Vue component glob. // If you set it, you can get completion by that components. // It is relative to root property. // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` globalComponents: [ './src/components/**/*.vue' ] } ] }
over 4 years ago · Santiago Trujillo Report

0

En VS Code, si el código real está en una subcarpeta (por ejemplo, tiene un monorepo), puede agregar un vetur.config.js en el directorio raíz como se indica a continuación.

 module.exports = { projects: [ { root: './frontend', // root of your vue project (should contain package.json) package: './package.json', // Relative to root property, don't change this. tsconfig: './tsconfig.json', // Relative to root property, don't change this. } ] }

Consulte la referencia de Vetur para obtener más detalles.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!