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

Error: There was an error running your build. Build failed. #172

Open
jamiek-acl opened this issue Jun 26, 2023 · 0 comments
Open

Error: There was an error running your build. Build failed. #172

jamiek-acl opened this issue Jun 26, 2023 · 0 comments

Comments

@jamiek-acl
Copy link
Contributor

jamiek-acl commented Jun 26, 2023

Hi! I'm upgrading Storybook from 5 to 7 and screener-storybook from 0.24.0 to 1.0.0. When I try and run screener-storybook locally, it outputs:

$ pnpm storybook:screener

> screener-storybook --conf screener.config.js --debug

screener-storybook v1.0.0

Use Static Storybook Build:
Started server: http://localhost:2000
DEBUG: GET http://localhost:2000 true undefined
DEBUG: GET http://localhost:2000 true undefined
DEBUG: GET http://localhost:2000 true undefined
DEBUG: GET http://localhost:2000 true undefined
...
DEBUG: GET http://localhost:2000 true undefined
DEBUG: Error: connect ECONNREFUSED ::1:2000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
---
Exiting Screener Storybook
Run with --debug flag to log additional information
Need help? Contact: help@saucelabs.com
 ELIFECYCLE  Command failed with exit code 1.

On Semaphore CI the output is:

pnpm storybook:screener Failed in 04:59

> screener-storybook --conf screener.config.js --debug
 
screener-storybook v1.0.0
 
Use Static Storybook Build:
/home/semaphore/.../storybook-static
Started server: http://localhost:2000
DEBUG: GET http://localhost:2000 null 200
DEBUG: previewRoute /iframe.html
DEBUG: GET http://localhost:2000/iframe.html
DEBUG: config.storybookPort 2000
DEBUG: config.storybook [...]
Connecting tunnel
Connected private encrypted tunnel to localhost:8000 (6966a3186446)
213 UI states to capture per resolution
Resolutions:
  1. 1280x720
Creating build for ...
Waiting for build #c451a056-18fb-49d9-8360-2531c1c0842e on raprm-4899--node-18 to complete...
View progress via Screener's Dashboard => https://screener.io/v2
.
.
Disconnecting tunnel
DEBUG: Error: There was an error running your build. Build failed.
View logs: https://screener.io/v2/dashboard/.../raprm-4899--node-18
    at /home/semaphore/.../node_modules/.pnpm/screener-runner@0.14.0/node_modules/screener-runner/src/runner.js:203:15
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:447:9)
---
Exiting Screener Storybook
Run with --debug flag to log additional information
Need help? Contact: help@saucelabs.com

 ELIFECYCLE  Command failed with exit code 1.

In Screener all of my snapshots have changed and now show a message that says:

No Preview
Sorry, but you either have no stories or none are selected somehow.
Please check the Storybook config.
Try reloading the page.
If the problem persists, check the browser console, or the terminal you've run Storybook from.

Something that may be important is that in Storybook I have disabled storyStoreV7.

// screener.config.js
module.exports = {
  projectRepo: '...',
  baseBranch: 'integration',
  storybookConfigDir: '.storybook',
  apiKey: '...',
  resolution: '1280x720',
  failureExitCode: 0,
  storybookStaticBuildDir: 'storybook-static',
};
// ./storybook/main.js
const path = require('path');

module.exports = {
  stories: ['../src/**/*.story.(js|jsx|tsx)'],
  addons: ['@storybook/addon-knobs', '@storybook/addon-actions', '@storybook/addon-a11y'],
  webpackFinal: async (defaultWebpackConfig) => {
    defaultWebpackConfig.module.rules.push(
      {
        test: /\.yml$/,
        use: ['json-loader', 'yaml-loader'],
      },
      {
        test: /\.scss$/,
        use: [
          'style-loader',
          {
            loader: 'css-loader',
            options: {
              importLoaders: 1,
              modules: {
                mode: 'icss',
              },
            },
          },
          'sass-loader',
        ],
      },
    );
    return defaultWebpackConfig;
  },
  framework: {
    name: '@storybook/react-webpack5',
    options: {},
  },
  docs: {
    autodocs: true,
  },
  features: {
    storyStoreV7: false,
  },
};
//package.json
    "@storybook/addon-a11y": "^7.0.22",
    "@storybook/addon-actions": "^7.0.22",
    "@storybook/addon-knobs": "^7.0.2",
    "@storybook/react": "^7.0.22",
    "@storybook/react-webpack5": "^7.0.22",
    "@storybook/theming": "^7.0.22",
    "react": "^16.13.0",
    "screener-storybook": "^1.0.0",
    "storybook": "^7.0.22",

Any ideas? Thanks.

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