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

388
Views
ERROR TypeError: Cannot add property 0, object is not extensible

I know this question appears several times. But didn't found solution for my app. I'm coding a function to color user avatars based on their name initials.

color = this.hashStringToColor(id);

this returns a color. then i push it into an array.

this.colorsByUser.push({
     color: color,
     id: id
});

this array is declared at the beginning in this way:

colorsByUser: IProfileColors[] = [];

IProfileColors is an interface and contains just color and id. As you see, nothing special is here but i have this weird error that i infer that means i cannot add nothing to the array. Is the first time i face it. Any ideas? Thanks in advance.

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!