#SharePointProblems | Koskila.net

Solutions are worthless unless shared! Antti K. Koskela's Personal Professional Blog

How to fix Visual Studio throwing a "This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.

koskila
Reading Time 2 min
Word Count 318 words
Comments 0 comments
Rating 5 (6 votes)
View

This one is something that I keep running into. Visual Studio just throws an error for a missing helper __spreadArray in a library that you didn't even know you had installed, and you're not sure if it should - or even can - be updated.

I guess Visual Studio just refuses to give me a break :) But like with so many different issues, there are multiple fixes available!

Problem

So when trying to build your solution or start debugging in Visual Studio, you run into an error somewhat like this:

TS2343	(TS) This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.

What do?

Solution

Okay, so check out the steps below!

Time needed: 1 minute.

Fixing "This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib' in Visual Studio

  1. Ignore the error

    Just ignoring the error might work. There's a non-zero chance that the error won't actually stop you from building and debugging.

    If actually DOES fail your build, proceed.

  2. Clean your solution and rebuild

    If cleaning and rebuilding your solution still doesn't help, well, there are more steps below.

  3. Restart Visual Studio

    This sounds stupid, but it might help - and even if it doesn't, restarting Visual Studio is reasonably quick to do. Nowadays, anyway.

  4. Update your tslib

    Updating your tslib version might be helpful if you're using an older version than 1.10.0. You should probably be running something more recent than that, as it was published sometime in 2019 :)

  5. Just reinstall the package

    Ok, so if everything else fails, this has worked for me every single time.

    Just run the command below:
    npm install tslib@latest --save

    Or if you actually know which version you want to use, run it like this:
    npm install tslib@[your-preferred-version]latest --save


Et voilà !

Did it help or not?

Comments

Interactive comments not implemented yet. Showing legacy comments migrated from WordPress.

No comments yet.

Whitewater Magpie Ltd.
© 2025
Static Site Generation timestamp: 2025-08-21T07:25:08Z