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

feat: add Storybook back to vite-ecosystem-ci #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

valentinpalkovic
Copy link

@valentinpalkovic valentinpalkovic commented Jun 3, 2024

Supersedes #307 and #137.

Second attempt: I have provided some scripts for the ecosystem-ci in Storybook's monorepo. I had to introduce a before-test script on our side to copy over the resolutions field from the root's package.json to the package.json of the created sandbox: https://github.com/storybookjs/storybook/pull/27518/files, but this should be fine I guess.

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🙏🏼

@patak-dev patak-dev changed the title Add Storybook to the vite-ecosystem-ci feat: add Storybook back to vite-ecosystem-ci Jun 3, 2024
@dominikg
Copy link
Collaborator

dominikg commented Jun 3, 2024

@valentinpalkovic thanks a lot. I am a bit confused by the repository setup of storybook, it looks like you have multiple different yarn versions in "packageManager" fields?

Trying to run the storybook test in this branch locally i get this error:

stdout: 'Installing Script Dependencies...',
  stderr: '(node:8492) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:\n' +
    `--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("esbuild-register/loader", pathToFileURL("./"));'\n` +
    '(Use `node --trace-warnings ...` to show where the warning was created)\n' +
    '(node:8492) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.\n' +
    '/home/dominikg/develop/vitejs/vite-ecosystem-ci/workspace/storybook/storybook/scripts/task.ts:2\n' +
    "import type { TestCase } from 'junit-xml';\n" +
    '^^^^^^\n' +
    '\n' +
    'SyntaxError: Cannot use import statement outside a module\n' +
    '    at loadCJSModule (node:internal/modules/esm/translators:215:21)\n' +
    '    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:297:7)\n' +
    '    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)\n' +
    '    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)\n' +
    '    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)\n' +
    '\n' +
    'Node.js v20.14.0',
  cwd: '/home/dominikg/develop/vitejs/vite-ecosystem-ci/workspace/storybook/storybook',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

(rebased to latest main that uses pnpm9 for vite-ecosystem-ci now)

This script looks like it runs yarn install again, which could cause issues if the overrides applied by vite-ecosystem-ci are not working correctly and that install pulls in vite from the registry again.

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

Successfully merging this pull request may close these issues.

None yet

3 participants