-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Plugin/Preset files are not allowed to export objects, only functions #5249
Comments
I have the exact same setup and running into the same issue. My steps to come to this error were:
|
I am having this same issue and not able to resolve :( "dependencies": { module.exports = function(api) { |
FYI the RN changes got delayed. SB5 launched last week without RN: https://medium.com/storybookjs/storybook-5-0-db1d0f9c83b8 We'll try to release an updated RN on |
@shilman so @storybook 5 doesn't work with react native right now? |
@Aleksion we just got it merged, so the next version of 5.1-alpha should contain it |
Gadzooks!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.7 containing PR #4942 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
I ran into this problem when we bumped babel-loader from 7.1.5 up to 8.0.5. Rolling babel-loader back to 7.1.5 worked in our situation. (your mileage may vary) |
I also had this issue I just change the babel-loader from 8.0.6 to 7.1.5 and it worked |
1. error when start storybook storybookjs/storybook#4116 2. use [email protected] to avoid storybookjs/storybook#5249
If someone is still facing this issue then please upgrade your babel-core version to latest. |
Describe the bug
I'm trying to run the storybook together with expo. But when I try to start storybook on web I get this error:
ERROR in ./storybook/addons.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/kristoffernielsen/repos/app/storybook/node_modules/babel-preset-react/lib/index.js
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Storybook will start.
System:
package.json
"dependencies": {
"expo": "^32.0.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
},
"devDependencies": {
"@storybook/addon-actions": "^4.1.6",
"@storybook/addon-knobs": "^4.1.6",
"@storybook/addon-links": "^4.1.6",
"@storybook/addon-ondevice-knobs": "^4.1.6",
"@storybook/addon-ondevice-notes": "^4.1.6",
"@storybook/addons": "^4.1.6",
"@storybook/react-native": "^4.1.6",
"babel-core": "^6.26.3",
"babel-preset-expo": "^5.0.0",
"babel-runtime": "^6.26.0",
"prop-types": "^15.6.2",
"react-dom": "16.5.0"
},
babel.config.js
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: