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

[Bug]: Init scaffolds broken template files in a Nextjs+JS project #30321

Open
valentinpalkovic opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@valentinpalkovic
Copy link
Contributor

Describe the bug

The template components (Button.jsx, etc.) uses the prop-types package to define prop types, but that package isn't added as a dependency, so starting Storybook results in a Webpack compile error.

Presumably prop-types was already part of Next.js with React 18, but not with React 19.

But we don't do that for Next.js. The quick fix would be to also the dependency in Next.js + JavaScript projects. But given the package has finally been removed from React in v19, we're actually adding legacy practices now with every init, so long term we should update our template components to not rely on prop-types. I don't know if react-docgen and/or react-docgen-typescript supports JSDoc types?

Reproduction link

Reproduction steps

System

-

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant