Ionic Vue project can't build - stencil-public-runtime.d.ts

Hi,

I’m sorry if this is a stupid question but I’m genuinely lost and have no clue how to fix this.

My project was building properly before upgrading to ionic 8 and it still works in development “serve” mode but errors out when trying to build the project for production.

This is the output for ionic build. (ignore the legacy bundle part, the same thing happens after updating browserlistrc to disable legacy building)

Thanks in advance and once again sorry if this is trivial and doesn’t belong here.

$ vue-cli-service build

⠋  Building legacy bundle for production...

 ERROR  Failed to compile with 14 errors                                                                                                                                                                                                          12:01:14 AM

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts

TS1011: An element access expression should take an argument.

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:31

TS1139: Type parameter declaration expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                               ^^^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:45

TS1005: ',' expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                             ^^^^^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:62

TS1005: ',' expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                              ^^^^^^^^^^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:74

TS1005: ',' expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                          ^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:76

TS1005: ',' expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                            ^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:78

TS1109: Expression expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                              ^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:97

TS1434: Unexpected keyword or identifier.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                 ^^^^^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:104

TS1128: Declaration or statement expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                        ^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:105

TS1128: Declaration or statement expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                         ^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:107

TS1434: Unexpected keyword or identifier.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                           ^^^^^^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:121

TS1109: Expression expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                                         ^^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:135

TS1005: ';' expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                                                       ^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 error  in node_modules/@ionic/core/dist/types/stencil-public-runtime.d.ts:467:137

TS1128: Declaration or statement expected.
    465 |  * @returns a class that is composed from extending each of the provided classes in the order they were provided.
    466 |  */
  > 467 | export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
        |                                                                                                                                         ^^
    468 | /**
    469 |  * This file gets copied to all distributions of stencil component collections.
    470 |  * - no imports

 ERROR  Error: Build failed with errors.
Error: Build failed with errors.
    at /Users/puffercat/PuffercatApps/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
    at /Users/puffercat/PuffercatApps/node_modules/webpack/lib/webpack.js:241:7
    at /Users/puffercat/PuffercatApps/node_modules/webpack/lib/HookWebpackError.js:101:2
    at Hook.eval [as callAsync] (eval at create (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/Hook.js:21:14)
    at Cache.shutdown (/Users/puffercat/PuffercatApps/node_modules/webpack/lib/Cache.js:182:23)
    at /Users/puffercat/PuffercatApps/node_modules/webpack/lib/Compiler.js:1447:15
    at Hook.eval [as callAsync] (eval at create (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/Hook.js:21:14)
    at Compiler.close (/Users/puffercat/PuffercatApps/node_modules/webpack/lib/Compiler.js:1440:23)
    at /Users/puffercat/PuffercatApps/node_modules/webpack/lib/webpack.js:240:15
    at finalCallback (/Users/puffercat/PuffercatApps/node_modules/webpack/lib/Compiler.js:540:32)
    at /Users/puffercat/PuffercatApps/node_modules/webpack/lib/Compiler.js:565:13
    at Hook.eval [as callAsync] (eval at create (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:33:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/Hook.js:21:14)
    at onCompiled (/Users/puffercat/PuffercatApps/node_modules/webpack/lib/Compiler.js:563:21)
    at /Users/puffercat/PuffercatApps/node_modules/webpack/lib/Compiler.js:1417:17
    at eval (eval at create (/Users/puffercat/PuffercatApps/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:14:1)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
error Command failed with exit code 1.

Hi ! Looks like typescript syntax erros.. maybe an upgrade of your typescript version could solve the problem ?

Right!
How much experience do you have?

Hi, thank you! I’m not super experienced but I’ve been doing frontend once in a while for a few years now. But I mostly work with regular JavaScript and somehow genuinely managed to forget TypeScript is something you can update…

Sorry for the stupid question and thanks for your help

There is no stupid question :slight_smile:

Also good to know you can remove TS and write JS instead if you prefer :

that is no stupid things
Sometimes my code also occur issues like that.
The future belongs only to those who seek to know a lot.
Let’s networking through whatsapp or telegram!
whatsapp : +81 70 9483 6776
telegram : tatsuyakuroda4