-
Notifications
You must be signed in to change notification settings - Fork 103
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]: macos - Error: Cannot find module '.../node_modules/config/webpack.config' #242
Comments
I can repro it with just |
This is similar to: storybookjs/storybook#10668 |
This works fine for me on WIndows but see the error above in a Linux VM and Bitbucket pipeline using Docker. The source of the issue is definitely that |
I tried to modify the module.exports = {
addons: [
'@storybook/preset-create-react-app'
]
}; to: module.exports = {
addons: [
{
name: '@storybook/preset-create-react-app'
options: {
scriptsPackageName: 'react-scripts'
}
}
]
}; And it is works for me. |
similar deal for me, where it works fine on windows, but not on mac. We have our own fork of react-scripts, but not storybook. |
Describe the bug
Unable to start storybook in MacOS when using with
rush
andpnpm
Steps to reproduce the behavior
Repro:
https://github.com/cyberuni/storybook-preset-mac-os/tree/cmd
You need to install
rush
for the repro (npm i -g @microsoft/rush
andcorepack enable
)rush install cd just-func/just-react rushx storybook
Expected behavior
storybook starts
Screenshots and/or logs
Environment
Additional context
The problem is caused by this code:
https://github.com/storybookjs/presets/blob/master/packages/preset-create-react-app/src/helpers/getReactScriptsPath.ts#L37-L39
scriptsBinPath
is something like.../node_modules/.bin/react-scripts
so going up two levels becomes
.../node_modules
Changing it to
join(resolvedBinPath, '..', '..', 'react-scripts')
or removing that code will fix the issue.The next block gets the correct path:
What's the use case for that code? Can it be adjusted or removed?
The text was updated successfully, but these errors were encountered: