bug: “export ‘__spreadArray’ was not found in ‘tslib’

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.

4 thoughts on “bug: “export ‘__spreadArray’ was not found in ‘tslib’