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

examples/cra-ts does not work #69

Closed
MinJieLiu opened this issue Nov 29, 2019 · 1 comment · Fixed by #70
Closed

examples/cra-ts does not work #69

MinJieLiu opened this issue Nov 29, 2019 · 1 comment · Fixed by #70
Labels
bug Something isn't working create-react-app

Comments

@MinJieLiu
Copy link

  1. Clone this project.
  2. yarn
  3. cd examples/cra-ts
  4. yarn storybook
  5. error:
Module parse failed: Unexpected token (7:20)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export default { title: 'Button' };
| 
> export const Default: FC = () => (
|   {process.env.REACT_APP_TEST_VAR}
| );

I found that preset-create-react-app does not support tsx ?

Module parse failed: Unexpected token (62:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| storiesOf('react-photo-view', module)
|   .add('Example', () => (
>     <PhotoProvider>
|       <ImageList>
|         {photoImages.map((item, index) => (
@shilman
Copy link
Member

shilman commented Nov 30, 2019

I'm seeing a different error:

ERROR in ./src/App.css
[...]
SyntaxError
(2:1) Unknown word
1 |
2 | var content = require("!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js??postcss!./App.css");

@mrmckeb any idea what's changed? this lines up with the postcss error in this comment: https://gist.github.com/shilman/bc9cbedb2a7efb5ec6710337cbd20c0c#gistcomment-3087039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working create-react-app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants