question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: "export '__spreadArray' was not found in 'tslib'

See original GitHub issue

Bug Report

Ionic version: 6.13.1

[ ] 4.x [x] 5.x

Current behavior:

Create a brand new vue project and the base example will not load. It warns first that export spreadArray is not found in tslib and then further complains in the console after ionic serve finishes initialization that it can’t find the function __spreadArray

In VS Code:

[vue-cli-service]  INFO  Starting development server...
[vue-cli-service]  WARNING  Compiled with 1 warning3:32:38 PM
[vue-cli-service]  warning  in ./node_modules/@ionic/core/dist/esm-es5/animation-096c6391.js
[vue-cli-service] "export '__spreadArray' was not found in 'tslib'
[vue-cli-service]   App running at:
[vue-cli-service]   - Local:   http://localhost:8100/
[vue-cli-service]   - Network: http://192.168.1.24:8100/
[vue-cli-service]   Note that the development build is not optimized.
[vue-cli-service]   To create a production build, run npm run build.

In Console:

index-7a8b7a1c.js?6d28:1 Uncaught (in promise) TypeError: Object(...) is not a function
    at addStyle (index-7a8b7a1c.js?6d28:1)
    at attachStyles (index-7a8b7a1c.js?6d28:1)
    at eval (index-7a8b7a1c.js?6d28:1)
    at step (tslib.es6.js?9ab4:100)
    at Object.eval [as next] (tslib.es6.js?9ab4:81)
    at eval (tslib.es6.js?9ab4:74)
    at new Promise (<anonymous>)
    at __awaiter (tslib.es6.js?9ab4:70)
    at updateComponent (index-7a8b7a1c.js?6d28:1)
    at eval (index-7a8b7a1c.js?6d28:1)
...

Expected behavior:

Should show the welcome page for a new templated project.

Steps to reproduce:

As shown above.

Related code:

ionic start

Ionic info:

Ionic:

   Ionic CLI       : 6.13.1 (C:\Users\Alvaro\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework : @ionic/vue 5.6.2

Capacitor:

   Capacitor CLI   : 2.4.7
   @capacitor/core : 2.4.7

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v14.16.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.11
   OS     : Windows 10

Have deleted node_modules and tried reinstalling (npm i) many times.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
liamdebeasicommented, Mar 24, 2021

Can you try explicitly installing tslib@2.1.0?

4reactions
boboldehampsinkcommented, Mar 23, 2021

Experiencing this on 5.6.2 with vue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ant design charts install error: '__spreadArray' is not exported ...
js Attempted import error: '__spreadArray' is not exported from 'tslib'. I get 0 warnings. the steps I have done: npm install @ant-design/charts ...
Read more >
'__spreadArray' is not exported from 'tslib' - Ionic Framework
__spreadArray was introduced on tslib 1.10.0 but a few dependencies are still on ... bug: "export '__spreadArray' was not found in 'tslib'.
Read more >
How to fix Visual Studio throwing a "This syntax requires an ...
How to fix Visual Studio throwing a “This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'.
Read more >
this syntax requires an imported helper named '__spreadarray'
error TS2343 : This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'....
Read more >
This syntax requires an imported helper but module 'tslib ...
Error : This syntax requires an imported helper but module 'tslib' cannot be found @sealed export class BugReport { type = 'report'; title:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found