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

466
Views
VS2015: errores "No se puede encontrar la definición de tipo" y "Archivo no encontrado"

Tengo una aplicación Angular2 que funcionó perfectamente bien hasta hace dos días. Cuando traté de compilar la solución en Visual Studio 2015, obtuve 10 errores:

 Build: Cannot find type definition file for 'hammerjs'. Build: Cannot find type definition file for 'jasmine'. Build: File (...)/wwwroot/lib/ng2-translate/index.ts' not found.

Y 6 más sobre varios archivos en ng2-translate no encontrados.

Sorprendentemente, cuando construyo mi aplicación con el comando dotnet run, funciona bien. Actualicé todo con npm-check-updates -u , pero no cambió nada. Mi paquete.json:

 { "version": "1.0.0", "name": "CarMarket", "private": true, "dependencies": { "@angular/common": "~4.0.3", "@angular/compiler": "~4.0.3", "@angular/core": "~4.0.3", "@angular/forms": "~4.0.3", "@angular/http": "~4.0.3", "@angular/platform-browser": "~4.0.3", "@angular/platform-browser-dynamic": "~4.0.3", "@angular/router": "~4.0.3", "@angular/upgrade": "~4.0.3", "angular-in-memory-web-api": "~0.3.1", "body-parser": "1.17.1", "bootstrap": "3.3.7", "chart.js": "^2.5.0", "core-js": "^2.4.1", "es6-shim": "^0.35.0", "fancybox": "3.0.0", "jquery": "3.2.1", "ng2-charts": "^1.5.0", "ng2-translate": "^5.0.0", "reflect-metadata": "^0.1.8", "rxjs": "5.3.0", "systemjs": "0.20.12", "zone.js": "^0.8.9" }, "devDependencies": { "@types/node": "^7.0.13", "del": "2.2.2", "gulp": "3.9.1", "gulp-typescript": "3.1.6", "gulp-watch": "4.3.11", "merge": "1.2.0", "typescript": "^2.0.10", "typings": "^2.1.1" }, "scripts": { "postinstall": "typings install" } }

¿Cuál puede ser la razón de esos errores? H

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Como indica claramente el error, faltan definiciones de tipo para hammerjs y jasmine. Puede agregarlos a su archivo de definición de tipos o puede instalar los paquetes de tipos directamente:

 npm install --save @types/hammerjs npm install --save @types/jasmine
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!