-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
node v17.0.1 react@next [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" #16623
Comments
Hi this need to be fixed because it's no longer a warning but an fatal error in Node 17 |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
still happening, I'm running the demo project https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/ |
So, there were a few issues with Node >17 and storybookjs (storybookjs/storybook#16623) that was causing errors on build, similarly to preactjs/preact#3745. It was fixed in the same way by react: facebook/react#22954
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Similar to #16180 there is a problem with
react@next
a.k.a. (react@18.0.0-alpha-...
), where the"exports"
field was added to thepackage.json
.Storybook tries to resolve
react/package.json
in lib/ui, builder-webpack5 and builder-webpack4node v12.22.7
is fine.node v14.18.1
is fine.node v16.13.0
succeed with a warning.node v17.0.1
throws an error.A possible solution for this specific
react/package.json
problem could be to just resolve the pkg name as inreact
instead ofreact/package.json
.Allthough this still might be broken should
react
choose to export a different subdirectory as its main entry.Further context is available at nodejs/node#33460
The text was updated successfully, but these errors were encountered: