stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: dist-custom-elements generated types missing some types when run in GitHub Actions

Open James-Wilkinson-git opened this issue 7 months ago • 14 comments

Prerequisites

Stencil Version

4.19.2

Current Behavior

We are missing two type files from the dist/types folder when running on GitHub Actions, these files are generated locally on our Windows machine, GitHub is running Ubuntu.

Run npx stencil build --debug --no-cache
[34:10.1]  @stencil/core
[34:10.3]  v4.19.2 🏉
[34:10.3]  node 20.15.1  MEM: 122.3MB
[34:10.3]  linux, AMD EPYC [7]()763 64-Core Processor  MEM: 122.3MB
[34:10.3]  cpus: 2, freemem: 7210MB, totalmem: [8]()315MB  MEM: 122.3MB
[34:10.3]  compiler:
           /home/runner/work//lib/common/components/stencil-components/node_modules/@stencil/core/compiler/stencil.js
            MEM: 122.3MB
[34:10.3]  build: 171[9]()938890  MEM: 122.3MB
[34:10.6]  cache optimizations disabled
[34:[10]().6]  create workers, maxWorkers: 1  MEM: 143.8MB
[34:10.6]  Starting compilation in watch mode...  MEM: 143.8MB
[34:12.6]  build, stencil-components, prod mode, started ...
[34:12.6]  start build, 2024-07-25T13:34:12  MEM: 283.2MB
[34:12.6]  cleaning 6 dirs ...  MEM: 283.2MB
[34:12.6]  cleaning dirs finished in 3 ms  MEM: 283.2MB
[34:12.6]  transpile started ...
[34:17.0]  Transpiled modules: 
[34:17.0]  generated app types started ...  MEM: 373.7MB
[34:17.1]  generateAppTypes: src/components.d.ts has changed  MEM:
           373.8MB
[34:17.1]  generated app types finished: src/components.d.ts in 24 ms
            MEM: 373.8MB
[34:17.1]  transpile finished in 4.42 s
[34:17.1]  generate outputs started ...  MEM: 373.8MB
[34:17.1]  getComponentAssetsCopyTasks: 0  MEM: 374.0MB
[34:17.1]  getComponentAssetsCopyTasks: 0  MEM: 374.0MB
[34:17.1]  getComponentAssetsCopyTasks: 0  MEM: 374.0MB
[34:17.1]  copy started ...
[34:17.1]  generate collections + source maps started ...  MEM:
           374.2MB
[34:17.8]  generate custom elements + source maps started ...
[34:17.8]  generate lazy + source maps started ...
[34:17.8]  generateEntryModules, 7 entryModules  MEM: 392.2MB
[34:17.8]  generate collections + source maps finished in 707 ms 
           MEM: 392.2MB
[34:18.7]  copy finished (2 files) in 1.66 s
[34:21.6]  generate custom elements + source maps finished in 3.81 s
[34:22.6]  generate lazy + source maps finished in 4.81 s
[34:22.6]  generate www started ...  MEM: 531.3MB
[34:22.6]  generateIndexHtml, write: www/index.html  MEM: 531.4MB
[34:22.6]  generate www finished in 22 ms  MEM: 531.4MB
[34:22.6]  generate types started ...  MEM: 531.7MB
[34:22.6]  generated app types started ...  MEM: 531.7MB
[34:22.6]  generated app types started ...  MEM: 531.7MB
[34:22.6]  generated app types finished: dist/types/components.d.ts in 7
           ms  MEM: 531.7MB
[34:22.6]  generated app types finished: dist/types/components.d.ts in 4
           ms  MEM: 531.7MB
[34:22.6]  generate types finished in 10 ms  MEM: 531.7MB
[34:22.6]  generate outputs finished in 5.57 s  MEM: 531.7MB
[34:22.6]  writeBuildFiles started ...  MEM: 531.7MB
[34:22.7]  in-memory-fs: data length: 1466  MEM: 537.6MB
[34:22.7]  cache: data length: 1  MEM: 537.6MB
[34:22.7]  writeBuildFiles finished, files wrote: 273 in 59 ms 
           MEM: 537.6MB
[34:22.7]  finished build, 10100ms  MEM: 538.8MB
[34:22.7]  build finished in 10.[11](https://github.com/EnableInternational/edamame-design-system/actions/runs/10095135893/job/27914546389#step:8:12) s

Stencil Config

import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';

export const config: Config = {
    namespace: 'stencil-components',
    globalStyle: 'src/global/app.scss',
    enableCache: false,
    outputTargets: [
        {
          type: 'dist',
          esmLoaderPath: '../loader',
        },
        {
            type: 'dist-custom-elements',
            dir: 'dist/custom-elements',
            empty: true,
            generateTypeDeclarations: true
        }
    ],
    plugins: [
        sass()
    ],
};

When I ls the dist/types directory it is missing two component directories, these are not missing on local.

I've also tried running the CI on Windows instead of Ubuntu to match my local same issue. And checked both machines have 16GB or ram and this says it uses 500MB of memory :/

Any ideas?

Expected Behavior

Should generate all type files in CI

System Info

No response

Steps to Reproduce

Compile custom components in github CI

Code Reproduction URL

na

Additional Information

No response

James-Wilkinson-git avatar Jul 25 '24 13:07 James-Wilkinson-git