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

Revert: Nuxt support #28479

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Revert: Nuxt support #28479

merged 2 commits into from
Jul 8, 2024

Conversation

ndelangen
Copy link
Member

What I did

Reverted this change: https://github.com/storybookjs/storybook/pull/26884/files

During QA before 8.2 release it was detected that it wasn't working correctly.

Reverting it and revisiting later unblocks the release, as we don't want to ship something that's broken.

We can release this feature, once fully working, in a patch release.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@ndelangen ndelangen added build Internal-facing build tooling & test updates nuxt ci:normal labels Jul 8, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Removed 'nuxt' from generateFrameworksFile in /code/core/scripts/helpers/sourcefiles.ts
  • Removed 'nuxt' mapping in /code/core/src/common/utils/framework-to-renderer.ts
  • Removed 'nuxt' from SupportedFrameworks in /code/core/src/types/modules/frameworks.ts
  • Removed 'nuxt' from SupportedRenderers in /code/core/src/types/modules/renderers.ts
  • Deleted /code/lib/cli/src/generators/NUXT/index.ts

13 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Jul 8, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a5b4809. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@valentinpalkovic valentinpalkovic merged commit d5b0fb7 into next Jul 8, 2024
53 of 54 checks passed
@valentinpalkovic valentinpalkovic deleted the revert/26884 branch July 8, 2024 14:30
@github-actions github-actions bot mentioned this pull request Jul 8, 2024
8 tasks
@tobiasdiez
Copy link
Contributor

What error did you experience? I just tried it with 8.2.0-beta.1 and it worked flawlessly for me. What is the procedure to get this back in?

Btw, pinging me and @chakAs3 during the QA and in this PR would have been appreciated. I spent quite some time trying to debug why storybook init is not working with the released 8.2.0 in a nuxt project, only to realize that my PR has been reverted last minute.

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Jul 13, 2024

Hi @tobiasdiez

We definitely planned to let you know about the revert. I apologize that we forget about it at the end.

We have tested the initialization of Nuxt in 8.2.0-beta.0 and the following errors occurred:

NPM:
npx nuxi@latest init (select npm)
cd ./nuxt-app
npx storybook@8.2.0-beta.0 init

Initialization succeeded, but while starting Storybook, I got the following error:

✘ [ERROR] Could not resolve "#app/entry"

    node_modules/@storybook-vue/nuxt/dist/preview.mjs:7:31:
      7 │   const nuxtApp = () => import('#app/entry').then((m) => m.default);
        ╵                                ~~~~~~~~~~~~

  You can mark the path "#app/entry" as external to exclude it from the bundle, which will remove
  this error and leave the unresolved path in the bundle. You can also add ".catch()" here to handle
  this failure at run-time instead of bundle-time.

PNPM:
npx nuxi@latest init (select pnpm)
cd ./nuxt-app
npx storybook@8.2.0-beta.0 init

The following error pops up during init


✔ Installing Storybook dependencies

     Error: Cannot find @storybook-vue/nuxt/package.json, Error: Cannot find module '@storybook-vue/nuxt/package.json'
Require stack:
- /Users/valentinpalkovic/.npm/_npx/30b66e50c619b15f/node_modules/storybook/dist/generate.cjs
- /Users/valentinpalkovic/.npm/_npx/30b66e50c619b15f/node_modules/storybook/bin/index.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Function.resolve (node:internal/modules/helpers:188:19)
    at getRendererDir (/Users/valentinpalkovic/.npm/_npx/30b66e50c619b15f/node_modules/storybook/dist/generate.cjs:60:11624)
    at templatePath (/Users/valentinpalkovic/.npm/_npx/30b66e50c619b15f/node_modules/storybook/dist/generate.cjs:62:2146)
    at copyTemplateFiles (/Users/valentinpalkovic/.npm/_npx/30b66e50c619b15f/node_modules/storybook/dist/generate.cjs:62:3340)
    at async baseGenerator (/Users/valentinpalkovic/.npm/_npx/30b66e50c619b15f/node_modules/storybook/dist/generate.cjs:108:782)

@tobiasdiez
Copy link
Contributor

The first issue has been fixed nuxt-modules/storybook#670. Not sure about the second one. When did you tested it?

@valentinpalkovic
Copy link
Contributor

5th of July with Storybook 8.2.0-beta.0

@tobiasdiez
Copy link
Contributor

okay, then I suppose it is fixed now as well with the latest release.
What is the plan to revert this revert?

We do still have a few issues that are reported (https://github.com/nuxt-modules/storybook/issues). But it would be very helpful for us to have the init script working for nuxt projects so that we get better reproductions and users can more easily test the latest version.

@valentinpalkovic
Copy link
Contributor

I will create a PR on Monday and if CI is green and initialization works I will merge it.

@valentinpalkovic valentinpalkovic mentioned this pull request Jul 15, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal nuxt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants