Skip to content

Storybook build intermittent #2179

@rajsite

Description

@rajsite

🧹 Tech Debt

The storybook build from a clean build is intermittent.
It seems to have started after the lint changes in #2168 but the causality isn't clear.

Workaround is to retry the build / re-ruun the CI job.

Example builds:
https://github.com/ni/nimble/actions/runs/9422583281/job/25959187261
https://github.com/ni/nimble/actions/runs/9421548135/job/25955858939

The build errors look like the following:

Module build failed (from ../../node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for ./src/docs/component-status.stories.ts.
    at makeSourceMapAndFinish (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:55:18)
    at successLoader (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:42:5)
    at Object.loader (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:23:5)
Module build failed (from ../../node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for ./src/nimble/anchor-button/anchor-button-matrix.stories.ts.
    at makeSourceMapAndFinish (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:55:18)
    at successLoader (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:42:5)
    at Object.loader (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:23:5)

[... repeated for each story]

Error: TypeScript emitted no output for ./src/utilities/states.ts.
    at makeSourceMapAndFinish (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:55:18)
    at successLoader (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:42:5)
    at Object.loader (/home/runner/work/nimble/nimble/node_modules/ts-loader/dist/index.js:23:5)
[tsl] ERROR in /home/runner/work/nimble/nimble/packages/nimble-components/src/utilities/unit-format/default-unit-format.ts(38,9)
      TS2322: Type '{ maximumSignificantDigits: number; maximumFractionDigits: number; roundingPriority: string; signDisplay: "auto" | "never" | "always" | "exceptZero" | undefined; }' is not assignable to type 'NumberFormatOptions'.
  Object literal may only specify known properties, and 'roundingPriority' does not exist in type 'NumberFormatOptions'.
=> Failed to build the preview
SB_BUILDER-WEBPACK5_0003 (WebpackCompilationError): There were problems when compiling your code with Webpack.
Run Storybook with --debug-webpack for more information.
    at /home/runner/work/nimble/nimble/node_modules/@storybook/builder-webpack5/dist/index.js:1:9328
    at /home/runner/work/nimble/nimble/node_modules/webpack/lib/HookWebpackError.js:68:3
    at Hook.eval [as callAsync] (eval at create (/home/runner/work/nimble/nimble/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/runner/work/nimble/nimble/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.shutdown (/home/runner/work/nimble/nimble/node_modules/webpack/lib/Cache.js:156:23)
    at /home/runner/work/nimble/nimble/node_modules/webpack/lib/Compiler.js:1358:15
    at Hook.eval [as callAsync] (eval at create (/home/runner/work/nimble/nimble/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/runner/work/nimble/nimble/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.close (/home/runner/work/nimble/nimble/node_modules/webpack/lib/Compiler.js:1351:23)
    at /home/runner/work/nimble/nimble/node_modules/@storybook/builder-webpack5/dist/index.js:1:9313

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions