storybook: [Bug]: Build hangs at "Output directory"

Describe the bug

We have a storybook setup using the NextJS framework and it seems to randomly hang at the step of info => Output directory: /vercel/path0/apps/joinhandshake-web/storybook-static

Output from recent build on Vercel: https://gist.github.com/pm0u/7e58e553cf3eee2ea07d9fc086d4a095

At this point it will hang for up to 45mins, which is the maximum build time on Vercel. It does also occasionally happen locally on MacOS. It does not happen every build.


  "dependencies": {
    "@headlessui/react": "^1.7.13",
    "@portabletext/react": "^2.0.0",
    "@sanity/client": "^6.1.1",
    "@sanity/image-url": "^1.0.1",
    "@types/async-retry": "^1.4.5",
    "@types/node": "^18.15",
    "@types/react": "~18.0.28",
    "@types/react-dom": "~18.0.11",
    "async-retry": "^1.3.3",
    "class-variance-authority": "^0.4.0",
    "cross-env": "^7.0.3",
    "interactjs": "^1.10.17",
    "jose": "^4.11.4",
    "lottie-react": "^2.4.0",
    "moment": "^2.29.4",
    "next": "13.3.1",
    "next-plugin-preval": "^1.2.4",
    "next-sanity": "^4.3.2",
    "next-sanity-image": "^6.0.0",
    "pixi.js": "^6.0.4",
    "postcss-media-minmax": "^5.0.0",
    "puppeteer": "^19.7.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-gist": "^1.2.4",
    "react-youtube": "^10.1.0",
    "schema-dts": "^1.1.2",
    "sharp": "^0.31.3",
    "typescript": "4.9.3"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "^13.1.2",
    "@storybook/addon-a11y": "^7.0.18",
    "@storybook/addon-actions": "7.0.18",
    "@storybook/addon-essentials": "7.0.18",
    "@storybook/addon-interactions": "7.0.18",
    "@storybook/addon-links": "7.0.18",
    "@storybook/blocks": "7.0.18",
    "@storybook/nextjs": "7.0.18",
    "@storybook/react": "7.0.18",
    "@types/twitter-for-web": "^0.0.2",
    "@typescript-eslint/eslint-plugin": "^5.47.0",
    "autoprefixer": "^10.4.13",
    "eslint": "8.28.0",
    "eslint-config-next": "13.1.2",
    "eslint-config-prettier": "^8.5.0",
    "eslint-config-standard-with-typescript": "^24.0.0",
    "eslint-mdx": "^2.0.5",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-mdx": "^2.0.5",
    "eslint-plugin-n": "^15.6.0",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-storybook": "^0.6.8",
    "eslint-plugin-tailwindcss": "^3.12.1",
    "file-loader": "^6.2.0",
    "postcss": "^8.4.21",
    "prettier": "^2.8.1",
    "prettier-plugin-tailwindcss": "^0.2.6",
    "sass": "^1.57.1",
    "storybook": "7.0.18",
    "stylelint": "^15.4.0",
    "stylelint-config-prettier": "^9.0.4",
    "stylelint-config-standard": "^32.0.0",
    "stylelint-prettier": "^3.0.0",
    "tailwindcss": "^3.3.2",
    "typescript-plugin-css-modules": "^5"
  }

This seems to have started with the upgrade to v7 and has occurred from versions 7.0.4 to 7.0.18. The first deployment we had this occur on, this is the package.json:

  "dependencies": {
    "@headlessui/react": "^1.7.13",
    "@portabletext/react": "^2.0.0",
    "@sanity/client": "^5.0.0",
    "@sanity/image-url": "^1.0.1",
    "@types/async-retry": "^1.4.5",
    "@types/node": "^18.15",
    "@types/react": "~18.0.28",
    "@types/react-dom": "~18.0.11",
    "async-retry": "^1.3.3",
    "class-variance-authority": "^0.4.0",
    "interactjs": "^1.10.17",
    "jose": "^4.11.4",
    "lottie-react": "^2.4.0",
    "next": "13.3.1",
    "next-plugin-preval": "^1.2.4",
    "next-sanity": "^4.1.5",
    "next-sanity-image": "^6.0.0",
    "pixi.js": "^6.0.4",
    "postcss-media-minmax": "^5.0.0",
    "puppeteer": "^19.7.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-youtube": "^10.1.0",
    "schema-dts": "^1.1.2",
    "sharp": "^0.31.3",
    "typescript": "4.9.3"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "^13.1.2",
    "@storybook/addon-a11y": "^7.0.4",
    "@storybook/addon-actions": "^7.0.4",
    "@storybook/addon-essentials": "^7.0.4",
    "@storybook/addon-interactions": "^7.0.4",
    "@storybook/addon-links": "^7.0.4",
    "@storybook/blocks": "^7.0.4",
    "@storybook/nextjs": "^7.0.4",
    "@storybook/react": "^7.0.4",
    "@typescript-eslint/eslint-plugin": "^5.47.0",
    "autoprefixer": "^10.4.13",
    "eslint": "8.28.0",
    "eslint-config-next": "13.1.2",
    "eslint-config-prettier": "^8.5.0",
    "eslint-config-standard-with-typescript": "^24.0.0",
    "eslint-mdx": "^2.0.5",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-mdx": "^2.0.5",
    "eslint-plugin-n": "^15.6.0",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-storybook": "^0.6.8",
    "eslint-plugin-tailwindcss": "^3.10.1",
    "file-loader": "^6.2.0",
    "jiti": "^1.18.2",
    "postcss": "^8.4.21",
    "prettier": "^2.8.1",
    "prettier-plugin-tailwindcss": "^0.2.6",
    "sass": "^1.57.1",
    "storybook": "^7.0.4",
    "stylelint": "^15.4.0",
    "stylelint-config-prettier": "^9.0.4",
    "stylelint-config-standard": "^32.0.0",
    "stylelint-prettier": "^3.0.0",
    "tailwindcss": "^3.3.1",
    "typescript-plugin-css-modules": "^5"
  }

The previous commit had the following package.json:

  "dependencies": {
  "@headlessui/react": "^1.7.13",
  "@portabletext/react": "^2.0.0",
  "@sanity/client": "^5.0.0",
  "@sanity/image-url": "^1.0.1",
  "@types/async-retry": "^1.4.5",
  "@types/node": "^18.15",
  "@types/react": "~18.0.28",
  "@types/react-dom": "~18.0.11",
  "async-retry": "^1.3.3",
  "class-variance-authority": "^0.4.0",
  "eslint-plugin-tailwindcss": "^3.10.1",
  "interactjs": "^1.10.17",
  "jose": "^4.11.4",
  "lottie-react": "^2.4.0",
  "next": "13.3.1",
  "next-plugin-preval": "^1.2.4",
  "next-sanity": "^4.1.5",
  "next-sanity-image": "^6.0.0",
  "pixi.js": "^6.0.4",
  "postcss-media-minmax": "^5.0.0",
  "puppeteer": "^19.7.1",
  "react": "18.2.0",
  "react-dom": "18.2.0",
  "react-youtube": "^10.1.0",
  "schema-dts": "^1.1.2",
  "sharp": "^0.31.3",
  "typescript": "4.9.3"
},
"devDependencies": {
  "@next/bundle-analyzer": "^13.1.2",
  "@storybook/addon-a11y": "^7.0.4",
  "@storybook/addon-actions": "^7.0.4",
  "@storybook/addon-essentials": "^7.0.4",
  "@storybook/addon-interactions": "^7.0.4",
  "@storybook/addon-links": "^7.0.4",
  "@storybook/blocks": "^7.0.4",
  "@storybook/nextjs": "^7.0.4",
  "@storybook/react": "^7.0.4",
  "@swc-node/register": "^1.6.3",
  "@swc/core": "^1.3.44",
  "@typescript-eslint/eslint-plugin": "^5.47.0",
  "autoprefixer": "^10.4.13",
  "eslint": "8.28.0",
  "eslint-config-next": "13.1.2",
  "eslint-config-prettier": "^8.5.0",
  "eslint-config-standard-with-typescript": "^24.0.0",
  "eslint-mdx": "^2.0.5",
  "eslint-plugin-import": "^2.26.0",
  "eslint-plugin-mdx": "^2.0.5",
  "eslint-plugin-n": "^15.6.0",
  "eslint-plugin-promise": "^6.1.1",
  "eslint-plugin-storybook": "^0.6.8",
  "file-loader": "^6.2.0",
  "postcss": "^8.4.21",
  "prettier": "^2.8.1",
  "prettier-plugin-tailwindcss": "^0.2.6",
  "sass": "^1.57.1",
  "storybook": "^7.0.4",
  "stylelint": "^15.4.0",
  "stylelint-config-prettier": "^9.0.4",
  "stylelint-config-standard": "^32.0.0",
  "stylelint-prettier": "^3.0.0",
  "tailwindcss": "^3.3.1",
  "typescript-plugin-css-modules": "^5"
}

There were 2 changes - adding jiti (which has now been removed in the latest/first package.json, problem persists) and moving eslint-plugin-tailwindcss to devDeps - I don’t think either of these changes are likely culprits.

Other things I’ve tried:

  • removing any stories that had SCSS dependencies, still persisted

To Reproduce

No response

System

Environment Info:

  System:
    OS: macOS 12.6.5
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.106
    Firefox: 112.0.2
    Safari: 16.5

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 6
  • Comments: 24 (9 by maintainers)

Most upvoted comments

@tony-scio what is this line?

/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/storybook/index.js:4 - setInterval(log, 2000)

I don’t see any such intervals in the SB codebase. What version are you on?

That was how I hacked in why-is-node-running when diagnosing. https://github.com/mafintosh/why-is-node-running#usage

As one more data point, we were experiencing this hang about 1 in 5 runs on local macbook pro m1s. We had telemetry disabled in main.js. This wasn’t enough (per the note in https://storybook.js.org/docs/react/configure/telemetry#how-to-opt-out that there is an event prior to processing main.js). Disabling it on the command line via --disable-telemetry appears to have made it rock solid.

In case helpful, here’s a why-is-node-running log from when telemetry was running and it hung.

# FSREQCALLBACK
node:internal/async_hooks:202
There are 29 handle(s) keeping the process running

# Timeout
node:internal/async_hooks:202                                                                                                   
node:internal/async_hooks:505                                                                                                   
node:internal/timers:164                                                                                                        
node:internal/timers:198                                                                                                        
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/storybook/index.js:4 - setInterval(log, 2000)
node:internal/modules/cjs/loader:1254                                                                                           
node:internal/modules/cjs/loader:1308                                                                                           
node:internal/modules/cjs/loader:1117                                                                                           

# PIPEWRAP
node:internal/async_hooks:202                      
node:internal/bootstrap/switches/is_main_thread:222
node:internal/bootstrap/loaders:190                
node:internal/bootstrap/loaders:314                
node:internal/bootstrap/loaders:294                
node:internal/bootstrap/loaders:299                

# DNSCHANNEL
node:internal/async_hooks:202       
node:internal/dns/utils:79          
node:internal/dns/utils:74          
node:internal/dns/utils:241         
node:internal/dns/utils:251         
node:internal/bootstrap/loaders:334 
node:internal/bootstrap/loaders:270 
node:internal/modules/cjs/helpers:56

# JSSTREAM
node:internal/async_hooks:202                                                                                                                        
node:internal/js_stream_socket:49                                                                                                                    
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:2621 - var JSStreamSocket = new tls.TLSSocket(new stream2.PassThrough())._handle._parentWrap.constructor;
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:9    - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:2710 - var JSStreamSocket = require_js_stream_socket();
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:9    - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:2911 - } = require_h1_over_h2();
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:9    - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;

# TLSWRAP
node:internal/async_hooks:202                                                                                                                        
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:2621 - var JSStreamSocket = new tls.TLSSocket(new stream2.PassThrough())._handle._parentWrap.constructor;
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:9    - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:2710 - var JSStreamSocket = require_js_stream_socket();
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:9    - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:2911 - } = require_h1_over_h2();
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@ndelangen/get-tarball/dist/index.js:9    - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;

# FILEHANDLE
node:internal/async_hooks:202

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                              
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/external/build_bazel_rules_nodejs/internal/node/node_patches.cjs:135                                          - origLstat(...args);
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:751            - self.fs.lstat(abs, statcb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:675            - this._stat(prefix, function (er, exists) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:322            - this._processSimple(pattern.join('/'), index, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:167            - this._process(this.minimatch.set[i], i, false, done)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob/glob.js:72             - return new Glob(pattern, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/node_modules/glob-promise/lib/index.js:5 - glob(pattern, options, (err, files) => err === null ? resolve(files) : reject(err))

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/graceful-fs.js:118              - return fs$readFile(path, options, function (err) {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/graceful-fs.js:115              - return go$readFile(path, options, cb)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:46

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                       
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                                  - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                                  - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/path-exists/index.js:6                      - return fs.access(path).then(() => true).catch(() => false)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:21                                 - if (typeof cb !== 'function') return fn.apply(this, args)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-server/dist/presets/common-preset.js:106
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-common/dist/index.js:15                  - `)}catch(e){let warning=level>0?`  Failed to load preset: ${JSON.stringify(input)} on level ${level}`:`  Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(e),[]}}async function loadPresets(presets,level,storybookOptions){return!presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options,presetsList:presets,presets:{apply:async(ext,c,a={})=>applyPresets(presets,ext,c,a,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject(newConfig)&&isObject(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return{apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options){let{corePresets=[],overridePresets=[],...restOptions}=options,presetsConfig=[...corePresets,...loadCustomPresets(options),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM(require("file-system-cache"));function createFileSystemCache(options){return(0,import_file_system_cache.default)(options)}var import_path5=__toESM(require("path")),import_pkg_dir=__toESM(require("pkg-dir"));function resolvePathInStorybookCache(fileOrDirectoryName){let cwd=process.cwd(),projectDir=import_pkg_dir.default.sync(cwd),cacheDirectory;return projectDir?cacheDirectory=import_path5.default.resolve(projectDir,"node_modules/.cache/storybook"):cacheDirectory=import_path5.default.resolve(cwd,".cache/storybook"),import_path5.default.join(cacheDirectory,fileOrDirectoryName)}var cache=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"});var import_node_logger3=require("@storybook/node-logger"),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!(config!=null&&config.addons)){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`)}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`)}};var import_lazy_universal_dotenv=require("lazy-universal-dotenv");var import_path6=__toESM(require("path")),import_find_up=__toESM(require("find-up")),getProjectRoot=()=>{let result;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path6.default.join(found,".."))}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path6.default.join(found,".."))}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path6.default.join(found,".."))}catch{}try{result=result||__dirname.split("node_modules")[0]}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p=>import_path6.default.resolve("./",p)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path6.default.sep}${filename}`}function loadEnvs(options={}){let defaultNodeEnv=options.production?"production":"development",env={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env[name]=process.env[name]});let base=Object.entries(env).reduce((acc,[k,v])=>Object.assign(acc,{[k]:JSON.stringify(v)}),{}),{stringified,raw}=(0,import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env.NODE_ENV}),fullRaw={...env,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key,value])=>(acc[key]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key,value])=>(acc[`process.env.${key}`]=JSON.stringify(value),acc),{});var import_path7=__toESM(require("path")),import_find_up2=require("find-up"),findDistEsm=(cwd,relativePath)=>{let nearestPackageJson=(0,import_find_up2.sync)("package.json",{cwd});if(!nearestPackageJson)throw new Error(`Could not find package.json in: ${cwd}`);let packageDir=import_path7.default.dirname(nearestPackageJson);return import_path7.default.join(packageDir,"dist","esm",relativePath)};var NODE_MODULES_RE=/node_modules/,commonGlobOptions=glob2=>NODE_MODULES_RE.test(glob2)?{}:{ignore:["**/node_modules/**"]};async function getBuilderOptions(options){var _a;let framework=await options.presets.apply("framework",{},options);if(typeof framework!="string"&&((_a=framework==null?void 0:framework.options)!=null&&_a.builder))return framework.options.builder;let{builder}=await options.presets.apply("core",{},options);return typeof builder!="string"&&(builder!=null&&builder.options)?builder.options:{}}var import_ts_dedent3=require("ts-dedent");async function getFrameworkName(options){let framework=await options.presets.apply("framework","",options);if(!framework)throw new Error(import_ts_dedent3.dedent`

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                      
node:internal/util:375                                                                                                             
node:internal/util:361                                                                                                             
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/locate-path/index.js:39 - const stat = await statFn(path.resolve(options.cwd, path_));
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/p-locate/index.js:12    - const testElement = async (element, tester) => tester(await element);

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                      
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                                 - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                                 - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/path-exists/index.js:6                     - return fs.access(path).then(() => true).catch(() => false)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:21                                - if (typeof cb !== 'function') return fn.apply(this, args)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-server/dist/presets/common-preset.js:48
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-server/dist/presets/common-preset.js:61

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                                      
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                                 - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                                 - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/path-exists/index.js:6                     - return fs.access(path).then(() => true).catch(() => false)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:21                                - if (typeof cb !== 'function') return fn.apply(this, args)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-server/dist/presets/common-preset.js:48
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/core-server/dist/presets/common-preset.js:61

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202                                                                                                                          
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/graceful-fs/polyfills.js:309                - : orig.call(fs, target, callback)
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/fs-extra/lib/ensure/file.js:16              - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:8                     - fn.call(
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/universalify/index.js:7                     - return new Promise((resolve, reject) => {
/private/var/tmp/_bazel_tony/7ebbc78ad9e9d4b46d567aa33c850b0b/execroot/com_github_askscio_scio/node_modules/@storybook/builder-manager/dist/index.js:67

# FSREQCALLBACK
node:internal/async_hooks:202

I’ve created a debug script that I think we will use for builds going forward to help pinpoint the issue. If we use this on every build hopefully in a few days we can get a useful log

// @ts-check
const { spawn } = require("node:child_process")
const chalk = require("chalk")

const waitMinutes = 10
const waitSeconds = waitMinutes * 60
const waitMilliseconds = waitSeconds * 1000

const whyNode = spawn(
  "why-is-node-running",
  ["./node_modules/.bin/storybook", "build"],
  { stdio: ["inherit", "pipe", "inherit"] }
)

const pidRegex = /kill -SIGUSR1 (\d+) for logging/

/** @type {string|null} */
let storybookPid = null

whyNode.stdout.on("data", (data) => {
  const match = pidRegex.exec(data)
  if (match !== null) {
    const [, pid] = match
    storybookPid = pid
  }
  console.log(/** @type {Buffer}  */ (data).toString("utf8"))
})

// wait until time set above, then log why node is running
const timeout = setTimeout(() => {
  console.error(
    chalk.redBright(
      `\n\nStorybook appears to be stuck, sending -SIGUSR1 to PID ${storybookPid}...\n`
    )
  )
  if (storybookPid !== null) {
    spawn("kill", ["-SIGUSR1", storybookPid])
    setTimeout(() => {
      console.log(chalk.redBright("\nKilling storybook process...\n"))
      whyNode.kill("SIGTERM")
      if (storybookPid !== null) {
        spawn("kill", ["-SIGTERM", storybookPid])
        console.log(chalk.redBright("\nExiting...\n"))
      }
      process.exit(1)
    }, 30000)
    return
  }
  console.log(chalk.red("No PID for storybook found"))
  process.exit(1)
}, waitMilliseconds)

// When storybook is done building, close up our timeout so the process can end - in case it hasn't run yet
whyNode.on("close", () => {
  clearTimeout(timeout)
})

Edit: updated script to fully working latest version