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

156
Views
Cuando intento usar algunas bibliotecas js sin d.ts, tengo errores

Entonces, por ejemplo, quiero usar una biblioteca cottonjs (no tengo un archivo d.ts). Y en angular.json O escribe dos veces

 "scripts": ["../node_modules/cottonjs/cotton.js"]

y en mi componente traté de declararlo

 import {Component, OnInit} from '@angular/core'; declare var Cotton:any; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit{ ngOnInit() { console.log(Cotton) } }

Pero cada vez que intento usar algunas bibliotecas en la consola, veo esto:

 ERROR ReferenceError: Cotton is not defined at AppComponent.ngOnInit (app.component.ts:11:17) at callHook (core.mjs:2542:1) at callHooks (core.mjs:2511:1) at executeInitAndCheckHooks (core.mjs:2462:1) at refreshView (core.mjs:9501:1) at renderComponentOrTemplate (core.mjs:9600:1) at tickRootContext (core.mjs:10854:1) at detectChangesInRootView (core.mjs:10879:1) at RootViewRef.detectChanges (core.mjs:21491:1) at ApplicationRef.tick (core.mjs:26563:1)

PD: no trabajo allí también Heeeeeeeelp por favor

about 4 years ago · Juan Pablo Isaza
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!