question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storybook problem class Icon

See original GitHub issue

Environment

Mac os, web, “react-native-vector-icons”: “^7.1.0”

Description

Hi @oblador :

We are developing a component in react-native which uses react-native-paper, as it also works on the web, which in turn uses react-native-vector-icons, but on react-native-vector-icons we are having the following error.

As you can see below the errors, the component appears to be loaded with data.

Can anyone help us out?

ERROR in ./node_modules/react-native-vector-icons/lib/create-icon-set.js 43:9
Module parse failed: Unexpected token (43:9)
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
| 
|   class Icon extends PureComponent {
>     root = null;
| 
|     static propTypes = {
 @ ./node_modules/react-native-vector-icons/MaterialCommunityIcons.js 6:0-50 9:16-29
 @ ./node_modules/react-native-paper/lib/module/components/MaterialCommunityIcon.js
 @ ./node_modules/react-native-paper/lib/module/components/Chip.js
 @ ./node_modules/react-native-paper/lib/module/index.js
 @ ./src/components/TestComponent10/TestComponent1.stories.js
 @ ./src/components sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(?:\[tj\]|[tj])s)$
 @ ./.storybook/generated-entry.js
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true
Schermata 2020-12-20 alle 13 01 22

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Angelk90commented, May 11, 2021

@lil5 : I can ask you to take a look at it, the project is this: Github

The result I get is this using: react-native-vector-icons

image

0reactions
atropos0902commented, Jun 20, 2021

@lil5 : I can ask you to take a look at it, the project is this: Github The result I get is this using: react-native-vector-icons image

Experiencing the same thing in react-native-web

Did you resolve the issue? Having the same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native web storybook react-native-vector-icons problem ...
I'm developing a react native component on storybook, which uses react-native-paper and react-native-vector-icons. The problem is that I ...
Read more >
Frequently Asked Questions - Storybook - JS.ORG
What icons are available for my toolbar or my addon? I see a "No Preview" error with a Storybook production build; Can I...
Read more >
Construct a screen out of components - Storybook Tutorials
As our app is straightforward, the screen we'll build is pretty trivial, simply wrapping the TaskList component (which supplies its own data via...
Read more >
Construct a screen out of components - Storybook Tutorials
One way to sidestep this problem is to never render container components anywhere in your app except at the highest level and instead...
Read more >
Story rendering - Storybook
Story rendering. In Storybook, your stories render in a particular “preview” iframe (Canvas tab) inside the larger Storybook web application. The JavaScript ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found