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]: Getting an error when try to add storybook with CRA #21260

Closed
zakariamagdyz opened this issue Feb 26, 2023 · 3 comments
Closed

[Bug]: Getting an error when try to add storybook with CRA #21260

zakariamagdyz opened this issue Feb 26, 2023 · 3 comments

Comments

@zakariamagdyz
Copy link

Describe the bug

`99% done plugins webpack-hot-middlewarewebpack built preview 397a36fc31538f2891fc in 16726ms
WARN Force closed manager build
ModuleParseError: Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (3:0)
File was processed with these loaders:

  • ./node_modules/@storybook/preset-create-react-app/node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
    You may need an additional loader to handle the result of these loaders.
    | webpack_require.$Refresh$.runtime = require('/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/react-refresh/runtime.js');
    |

export const parameters = {
| actions: { argTypesRegex: "^on[A-Z]." },
| controls: {
at handleParseError (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/NormalModule.js:976:19)
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/NormalModule.js:1095:5
at processResult (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/NormalModule.js:800:11)
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/NormalModule.js:860:5
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/loader-runner/lib/LoaderRunner.js:407:3
at iterateNormalLoaders (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/loader-runner/lib/LoaderRunner.js:233:10)
at iterateNormalLoaders (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/loader-runner/lib/LoaderRunner.js:240:10)
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/loader-runner/lib/LoaderRunner.js:255:3
at context.callback (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/@storybook/preset-create-react-app/node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js:94:7
ModuleNotFoundError: Module not found: Error: Can't resolve '/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/@storybook/client-api' in '/mnt/ssd/Projects/Work/hollydesk-v2/.storybook'
Did you mean 'index.js'?
BREAKING CHANGE: The request '/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/@storybook/client-api' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '
.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/Compilation.js:2016:28
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/NormalModuleFactory.js:798:13
at eval (eval at create (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/lib/NormalModuleFactory.js:270:22
at eval (eval at create (/mnt/ssd/Projects/Work/hollydesk-v2/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)`

To Reproduce

No response

System

os : linux(pop-os)

Additional context

No response

@shilman
Copy link
Member

shilman commented Feb 27, 2023

Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. 🙏

If not, can you provide repro steps? Which version of CRA? Which versions of Storybook packages?

@github-actions
Copy link
Contributor

Hi there! Thank you for opening this issue, but it has been marked as stale because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!

@github-actions github-actions bot added the Stale label Jul 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
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

2 participants