-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Module parse failed - Babel loader issue? #16
Comments
Are you using babel6? Try to see you have a .babelrc in your project root and it has es2015 and react presets. If not, try to create a sample repo and send to me. I will work on it. |
Yes. This is my {
"presets": ["es2015", "react", "stage-0"],
"plugins": [
"transform-runtime",
"typecheck",
"transform-decorators-legacy",
"transform-class-properties",
"add-module-exports",
"import-asserts"
]
} I'll work on a repo. |
Great. |
npm 3.7.3 and node 5.9.1 |
Okay. Just to make it sure. Send me a sample repo. |
I'm seeing something similar when my webpack config works correctly for production: ERROR in ./lib/shared/views/stories/primaryNav.jsx
Module parse failed: .../lib/shared/views/stories/primaryNav.jsx Line 7: Unexpected token <
You may need an appropriate loader to handle this file type.
| storiesOf('Primary Nav', module)
| .add('empty nav', () => (
| <PrimaryNav primaryNav={[]}/>
| ));
@ ./.storybook/config.js 6:4-57
This is a fairly simple reference app that I thought would be a good testbed for this tool, but I can't seem to figure out how to get past this issue. This project is public. |
Digging through the examples in more detail, I realized that I needed to add a |
@travi I assume this because of the .jsx extension. |
Thank you for that tip. Pulling down that latest version did enabled me to remove the diplicated I'm still getting |
@travi Great. That's better for another issue. |
@elado I assume this fixed. If not, please re-open and give me more info. |
Looks like it's fixed in the most recent version. Thanks! |
Great. |
react-storybook and react-storybook-demo are broken again. To fix them, remove all carets/^ from package.json, then run: OR Then update the webpack packages to the latest. The following package.json for react-storybook-demo runs both the todo application, and react storybook.
Also, I'm using node 6.8.1, npm 3.10.8. |
Check if url params are present before setting knob values from them
when I run
I get the error
when I do
works fine can somebody explain what's the difference? I'm pulling my hair out... I need to have shared components installed by npm so my storybook components will be sitting under node_modules folder. Thanks, |
@unutoiul This is because the babel loader in our webpack config excludes If you want to do this you either:
|
yes my solution was: webpack.config.js
|
Getting an error when running with this
.storybook/config.js
:Error:
Seems like babel is not transpiling or it clashes with some config in my package?
The text was updated successfully, but these errors were encountered: