Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running initial Chromatic build through the CLI fails #237

Open
haapti opened this issue Mar 10, 2025 · 0 comments
Open

Running initial Chromatic build through the CLI fails #237

haapti opened this issue Mar 10, 2025 · 0 comments

Comments

@haapti
Copy link

haapti commented Mar 10, 2025

Running initial Chromatic build through the CLI fails. I have followed the installation instructions and instructions related to Playwright BDD.

First running the test suite npx bddgen && npx playwright test. Successful run adds test-results/chromatic-archives with contents.

Running yarn chromatic --playwright --project-token=xxx --debug gives me following result

11:56:40.898 Chromatic CLI v11.25.2
             https://www.chromatic.com/docs/cli

11:56:41.149 Authenticating with Chromatic
11:56:41.149     → Connecting to https://index.chromatic.com
11:56:41.651 Authenticated with Chromatic
                 → Using project token '****************'
11:56:41.652 Retrieving git information
11:56:41.724 git info: {"commit":{"commit":"008a63ce802ac3fe20d1a354122148baa61c58d9","committedAt":1741599938000,"committerEmail":"","committerName":""},"branch":"try-playwright-chromatic","fromCI":false}
11:56:42.315 App firstBuild: %o, lastBuild: %o null null
11:56:42.316 App has no builds, returning []
11:56:42.317 Found parentCommits: 
11:56:42.764 Retrieved git information
                 → Commit '008a63c' on branch 'try-playwright-chromatic'; no ancestor found
11:56:42.764 Collecting test suite metadata
11:56:42.765 {"storybookV6error":{"code":"MODULE_NOT_FOUND","requireStack":["/Users/haapti/Projects/web/node_modules/@chromatic-com/storybook/node_modules/chromatic/dist/chunk-TKGT252T.js","/Users/haapti/Projects/web/node_modules/@chromatic-com/storybook/node_modules/chromatic/dist/bin.js"]}}
11:56:42.765 {"storybookV7error":{"errno":-2,"code":"ENOENT","syscall":"scandir","path":".storybook"}}
11:56:42.766 No viewlayer package listed in dependencies. Checking transitive dependencies.
11:56:42.767 [{"status":"fulfilled","value":{"addons":[{"name":"unknown","packageName":"unknown","packageVersion":"0"}]}},{"status":"fulfilled","value":{}},{"status":"rejected","reason":{}},{"status":"fulfilled","value":{"builder":{"name":"unknown","packageVersion":"0"}}}]
11:56:42.768 Collected test suite metadata
                 → Playwright for E2E
11:56:42.768 Initializing build
11:56:42.768 Got environment:
             {}
11:56:43.257 Initialized build
                 → Build 8 initialized
11:56:43.265 Building your test suite
11:56:43.266     → Running command: node /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/dist/bin/build-archive-storybook.js --output-dir=/var/folders/14/ygf4jnvx7d19fqp6j1_580300000gp/T/chromatic--1210-s6jf60up1jly
11:56:43.266     → [*                   ]
11:56:43.268 Running build command: node /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/dist/bin/build-archive-storybook.js --output-dir=/var/folders/14/ygf4jnvx7d19fqp6j1_580300000gp/T/chromatic--1210-s6jf60up1jly
11:56:43.268 Runtime metadata: {
               "nodePlatform": "darwin",
               "nodeVersion": "20.15.0",
               "packageManager": "yarn",
               "packageManagerVersion": "1.22.22"
             }
11:56:44.777     ✖ Failed to run `chromatic --playwright`:
                 
                 Command failed with exit code 1: node /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/dist/bin/build-archive-storybook.js --output-dir=/var/folders/14/ygf4jnvx7d19fqp6j1_580300000gp/T/chromatic--1210-s6jf60up1jly
             <s> [webpack.Progress] 0% 
             
             <s> [webpack.Progress] 1% setup before run
             <s> [webpack.Progress] 1% setup before run NodeEnvironmentPlugin
             <s> [webpack.Progress] 1% setup before run
             <s> [webpack.Progress] 2% setup run
             <s> [webpack.Progress] 2% setup run
             <s> [webpack.Progress] 4% setup normal module factory
             <s> [webpack.Progress] 4% setup normal module factory CaseSensitivePathsPlugin
             <s> [webpack.Progress] 4% setup normal module factory
             <s> [webpack.Progress] 5% setup context module factory
             <s> [webpack.Progress] 5% setup context module factory
             <s> [webpack.Progress] 6% setup before compile
             <s> [webpack.Progress] 6% setup before compile ProgressPlugin
             <s> [webpack.Progress] 6% setup before compile
             <s> [webpack.Progress] 7% setup compile
             <s> [webpack.Progress] 7% setup compile ExternalsPlugin
             <s> [webpack.Progress] 7% setup compile ExternalsPlugin
             <s> [webpack.Progress] 7% setup compile
             <s> [webpack.Progress] 8% setup compilation
             <s> [webpack.Progress] 8% setup compilation HtmlWebpackPlugin
             <s> [webpack.Progress] 8% setup compilation unplugin-csf
             <s> [webpack.Progress] 8% setup compilation ArrayPushCallbackChunkFormatPlugin
             <s> [webpack.Progress] 8% setup compilation JsonpChunkLoadingPlugin
             <s> [webpack.Progress] 8% setup compilation StartupChunkDependenciesPlugin
             <s> [webpack.Progress] 8% setup compilation ImportScriptsChunkLoadingPlugin
             <s> [webpack.Progress] 8% setup compilation FetchCompileWasmPlugin
             <s> [webpack.Progress] 8% setup compilation FetchCompileAsyncWasmPlugin
             <s> [webpack.Progress] 8% setup compilation WorkerPlugin
             <s> [webpack.Progress] 8% setup compilation SplitChunksPlugin
             <s> [webpack.Progress] 8% setup compilation RuntimeChunkPlugin
             <s> [webpack.Progress] 8% setup compilation ResolverCachePlugin
             <s> [webpack.Progress] 8% setup compilation
             <s> [webpack.Progress] 9% setup compilation
             <s> [webpack.Progress] 9% setup compilation DefinePlugin
             <s> [webpack.Progress] 9% setup compilation ProvidePlugin
             <s> [webpack.Progress] 9% setup compilation ProgressPlugin
             <s> [webpack.Progress] 9% setup compilation ChunkPrefetchPreloadPlugin
             <s> [webpack.Progress] 9% setup compilation SourceMapDevToolPlugin
             <s> [webpack.Progress] 9% setup compilation JavascriptModulesPlugin
             <s> [webpack.Progress] 9% setup compilation JsonModulesPlugin
             <s> [webpack.Progress] 9% setup compilation AssetModulesPlugin
             <s> [webpack.Progress] 9% setup compilation EntryPlugin
             <s> [webpack.Progress] 9% setup compilation RuntimePlugin
             <s> [webpack.Progress] 9% setup compilation InferAsyncModulesPlugin
             <s> [webpack.Progress] 9% setup compilation DataUriPlugin
             <s> [webpack.Progress] 9% setup compilation FileUriPlugin
             <s> [webpack.Progress] 9% setup compilation CompatibilityPlugin
             <s> [webpack.Progress] 9% setup compilation HarmonyModulesPlugin
             <s> [webpack.Progress] 9% setup compilation AMDPlugin
             <s> [webpack.Progress] 9% setup compilation RequireJsStuffPlugin
             <s> [webpack.Progress] 9% setup compilation CommonJsPlugin
             <s> [webpack.Progress] 9% setup compilation LoaderPlugin
             <s> [webpack.Progress] 9% setup compilation LoaderPlugin
             <s> [webpack.Progress] 9% setup compilation NodeStuffPlugin
             <s> [webpack.Progress] 9% setup compilation APIPlugin
             <s> [webpack.Progress] 9% setup compilation ExportsInfoApiPlugin
             <s> [webpack.Progress] 9% setup compilation WebpackIsIncludedPlugin
             <s> [webpack.Progress] 9% setup compilation ConstPlugin
             <s> [webpack.Progress] 9% setup compilation UseStrictPlugin
             <s> [webpack.Progress] 9% setup compilation RequireIncludePlugin
             <s> [webpack.Progress] 9% setup compilation RequireEnsurePlugin
             <s> [webpack.Progress] 9% setup compilation RequireContextPlugin
             <s> [webpack.Progress] 9% setup compilation ImportPlugin
             <s> [webpack.Progress] 9% setup compilation ImportMetaContextPlugin
             <s> [webpack.Progress] 9% setup compilation SystemPlugin
             <s> [webpack.Progress] 9% setup compilation ImportMetaPlugin
             <s> [webpack.Progress] 9% setup compilation URLPlugin
             <s> [webpack.Progress] 9% setup compilation DefaultStatsFactoryPlugin
             <s> [webpack.Progress] 9% setup compilation DefaultStatsPresetPlugin
             <s> [webpack.Progress] 9% setup compilation DefaultStatsPrinterPlugin
             <s> [webpack.Progress] 9% setup compilation JavascriptMetaInfoPlugin
             <s> [webpack.Progress] 9% setup compilation EnsureChunkConditionsPlugin
             <s> [webpack.Progress] 9% setup compilation RemoveEmptyChunksPlugin
             <s> [webpack.Progress] 9% setup compilation MergeDuplicateChunksPlugin
             <s> [webpack.Progress] 9% setup compilation FlagIncludedChunksPlugin
             <s> [webpack.Progress] 9% setup compilation SideEffectsFlagPlugin
             <s> [webpack.Progress] 9% setup compilation FlagDependencyExportsPlugin
             <s> [webpack.Progress] 9% setup compilation FlagDependencyUsagePlugin
             <s> [webpack.Progress] 9% setup compilation InnerGraphPlugin
             <s> [webpack.Progress] 9% setup compilation MangleExportsPlugin
             <s> [webpack.Progress] 9% setup compilation ModuleConcatenationPlugin
             <s> [webpack.Progress] 9% setup compilation NoEmitOnErrorsPlugin
             <s> [webpack.Progress] 9% setup compilation RealContentHashPlugin
             <s> [webpack.Progress] 9% setup compilation WasmFinalizeExportsPlugin
             <s> [webpack.Progress] 9% setup compilation NamedModuleIdsPlugin
             <s> [webpack.Progress] 9% setup compilation DeterministicChunkIdsPlugin
             <s> [webpack.Progress] 9% setup compilation DefinePlugin
             <s> [webpack.Progress] 9% setup compilation TerserPlugin
             <s> [webpack.Progress] 9% setup compilation TemplatedPathPlugin
             <s> [webpack.Progress] 9% setup compilation RecordIdsPlugin
             <s> [webpack.Progress] 9% setup compilation WarnCaseSensitiveModulesPlugin
             <s> [webpack.Progress] 9% setup compilation IgnoreWarningsPlugin
             <s> [webpack.Progress] 9% setup compilation
             <s> [webpack.Progress] 10% building
             <s> [webpack.Progress] 10% building 0/1 entries 0/0 dependencies 0/0 modules
             <s> [webpack.Progress] 34% building 1/1 entries 7/16 dependencies 4/6 modules
             <s> [webpack.Progress] 99% cache begin idle
             <s> [webpack.Progress] 99% cache begin idle
             <s> [webpack.Progress] 100% 
             
             <s> [webpack.Progress] 99% cache shutdown
             <s> [webpack.Progress] 99% cache shutdown
             <s> [webpack.Progress] 100% 
             
             node:internal/errors:984
             const err = new Error(message);
                         ^
             
             Error: Command failed: node /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/node_modules/storybook/bin/index.cjs build --output-dir=/var/folders/14/ygf4jnvx7d19fqp6j1_580300000gp/T/chromatic--1210-s6jf60up1jly -c /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/dist/storybook-config
               at genericNodeError (node:internal/errors:984:15)
               at wrappedFn (node:internal/errors:538:14)
               at checkExecSyncError (node:child_process:890:11)
               at Object.execFileSync (node:child_process:926:15)
               at /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/dist/bin/build-archive-storybook.js:15:2609 {
             status: 1,
             signal: null,
             output: [ null, null, null ],
             pid: 1261,
             stdout: null,
             stderr: null
             }
             
             Node.js v20.15.0
11:56:44.777     → Command failed: node /Users/haapti/Projects/web/node_modules/@chromatic-com/playwright/dist/bin/build-archive-storybook.js --output-dir=/var/folders/14/ygf4jnvx7d19fqp6j1_580300000gp/T/chromatic--1210-s6jf60up1jly
11:56:44.784 ℹ Wrote Chromatic diagnostics report to chromatic-diagnostics.json
error Command failed with exit code 51.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Package versions

"dependencies": {
    "@currents/playwright": "1.9.2",
    "@playwright/test": "1.50.1",
    "axe-playwright": "2.0.3",
    "html-validate": "9.2.1"
  },
  "devDependencies": {
    "@chromatic-com/playwright": "^0.11.3",
    "chromatic": "11.27.0",
    "playwright-bdd": "8.0.1",
    "typescript": "5.7.3"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant