Closed aaronadamsCA closed 1 year ago
Just to add, I'm seeing the same thing on 6.5.0
(non-rc):
warning " > @storybook/react@6.5.0" has unmet peer dependency "require-from-string@^2.0.2".
I've updated the issue to reflect that these are still concerns in v6.5.0
.
🙏🏼
It looks like require-from-string
is only used in tests which seems to me that the proper resolution for @storybook/react
would be to move that dependency to devDependencies
.
Good call; I've updated the issue.
Any updates on require-from-string
warning? Still getting it on storybook 6.5.14
:
require-from-string
will be a devDependency in 7.0.0
@ndelangen, what is the timeline for 7.0.0 ?
@fasani-tx it's in beta now and we're planning to release in Q1 next year
Would it be possible to backport the change for require-from-string
to 6.5.x, as it should (hopefully) be as simple as doing:
diff --git a/app/react/package.json b/app/react/package.json
index 77b94b7889..0b6bc57ec6 100644
--- a/app/react/package.json
+++ b/app/react/package.json
@@ -85,13 +85,13 @@
"devDependencies": {
"@types/util-deprecate": "^1.0.0",
"jest-specific-snapshot": "^4.0.0",
+ "require-from-string": "^2.0.2",
"webpack": "4"
},
"peerDependencies": {
"@babel/core": "^7.11.5",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "require-from-string": "^2.0.2"
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"@babel/core": {
diff --git a/yarn.lock b/yarn.lock
index 72c088e497..88f4ef9f50 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8370,6 +8370,7 @@ __metadata:
react-refresh: ^0.11.0
read-pkg-up: ^7.0.1
regenerator-runtime: ^0.13.7
+ require-from-string: ^2.0.2
ts-dedent: ^2.0.0
util-deprecate: ^1.0.2
webpack: 4
@@ -8377,7 +8378,6 @@ __metadata:
"@babel/core": ^7.11.5
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
- require-from-string: ^2.0.2
peerDependenciesMeta:
"@babel/core":
optional: true
I'd make a PR, but I'm not sure what branch that should be made against.
@fasani-tx Here's the 7.0 burndown: https://github.com/orgs/storybookjs/projects/8/views/1
@ndelangen It looks like the latest release of 6.5
(6.5.16
) still has require-from-string
as a peer dependency, though this issue was closed.
Will this dependency issue only be fixed on the 7.x
line or can that change be backported? Happy to also open a PR myself with my diff above, though not sure what branch would be appropriate for it.
the right branch to target would be main-prerelease
Describe the bug Upgrading to
v6.5.0
emits several new dependency warnings in our repository compared to Storybook 6.4:I think this would be fixed with the following changes:
@storybook/react
- move peer dependencyrequire-from-string
to dev dependencies@storybook/addon-docs
- add peer dependencies@babel/core
andwebpack
@storybook/docs-tools
- add peer dependenciesreact
andreact-dom
@storybook/mdx1-csf
- add peer dependency@babel/core
@storybook/telemetry
- add peer dependenciesreact
andreact-dom
To Reproduce These are our Storybook dependencies today:
System